PHP 中是否有函数和/或对象和/或扩展可以让您查看当前作用域中定义的所有变量?比如:
var_export($GLOBALS)
但只显示当前符号表中的变量。
最佳答案
This function returns a multidimensional array containing a list of all defined variables, be them environment, server or user-defined variables, within the scope that
get_defined_vars()
is called.
关于php - 如何获取当前范围/符号表中定义的所有变量?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/717852/