php 查看所有已载入文件和所有变量

<?php
echo '<pre>';
 //查看运行到打印行的所有载入文件
 
$debug_included_files = get_included_files();
echo "<br/><br/>included_files=<br/>";
print_r($debug_included_files);
 
 
//查看系统里的所有变量
echo "<br/><br/>globals=<br/>";
print_r($globals);    
 
// $GLOBALS --- 保存所有全局变量(只在当前页面中的) 
//get_defined_vars() --- 返回由所有已定义变量所组成的数组(包括全局变量,超全局变量等)  这个比较常用,输出的比较详细
//get_defined_constants() --- 返回由所有已定义常量所组成的数组 
echo "<br/><br/>get_defined_vars=<br/>";
$debug_get_defined_vars = get_defined_vars();
print_r($debug_get_defined_vars);    
 
echo "<br/><br/>get_defined_constants=<br/>";
$debug_get_defined_constants = get_defined_constants();
print_r($debug_get_defined_constants);    
 
// get_defined_functions (PHP 4 >= 4.0.4, PHP 5) — 获取所有已经定义的函数
echo "<br/><br/>get_defined_functions=<br/>";
$debug_get_defined_functions = get_defined_functions();
print_r($debug_get_defined_functions);
 
//get_loaded_extensions (PHP 4, PHP 5) — 获取所有可用的模块
echo "<br/><br/>get_loaded_extensions=<br/>";
print_r(get_loaded_extensions());
 
// get_extension_funcs (PHP 4, PHP 5) — 获取指定模块的可用函数
echo "<br/><br/>get_extension_funcs=<br/>";
print_r(get_extension_funcs("gd"));
print_r(get_extension_funcs("xml"));
 
//get_defined_constants (PHP 4 >= 4.1.0, PHP 5) —  获取关联数组的名字所有的常量和他们的价值\n
echo "<br/><br/>get_defined_constants=<br/>";
print_r(get_defined_constants(true));
 
//get_declared_classes (PHP 4, PHP 5) —  获取由已定义类的名字所组成的数组
echo "<br/><br/>get_declared_classes=<br/>";
print_r(get_declared_classes());
?>            

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值