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
I hope this article will be helpful to everyone’s PHP programming design.