Summary of how to get system variables in php, summary of how to get variables in php_PHP tutorial

WBOY
Release: 2016-07-13 09:52:30
Original
837 people have browsed it

A summary of how to get system variables in php, a summary of how to get variables in php

The example in this article describes how to get system variables in php. Share it with everyone for your reference. The details are as follows:

Various system variables are obtained here through some PHP built-in functions.

$v = get_defined_vars();//返回由所有已定义变量所组成的数组
print_r($v);
// get all defined objects
$v = get_object_vars();//返回由对象属性组成的关联数组
print_r($v);
// classic
phpinfo();//输出关于 PHP 配置的信息
// php版本 (something like: 4.3.10)
print phpversion();//输出版本号:5.3.3

Copy after login

I hope this article will be helpful to everyone’s PHP programming design.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1008000.htmlTechArticleA summary of how to get system variables in php, a summary of how to get system variables in php. This example describes how to get system variables in php. Share it with everyone for your reference. The details are as follows: Here are some p...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template