php - 如何获取当前范围/符号表中定义的所有变量?

标签 php debugging scope

PHP 中是否有函数和/或对象和/或扩展可以让您查看当前作用域中定义的所有变量?比如:

var_export($GLOBALS)

但只显示当前符号表中的变量。

最佳答案

get_defined_vars

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/

相关文章:

php - 如何将查询结果显示为4列并移动到4列之后的另一行?

php - 新闻提要数据库设计效率

C++溢出新关键字调试

c# - 调试混合的 Delphi( native )和 C# 代码,得到 "binary was built without debug information"

vb.net - With... End With vs Using in VB.NET

c# - 为什么我可以声明一个与父作用域中的变量同名的子变量?

php - Laravel 8 dd() 限制

javascript - 使用 angularjs 和 JSON 从数据库获取数据

php - print_r() 仅打印出数组中的 150 个元素

Javascript Scope - 包括不传递或使全局