Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Get All Variables Declared In A PHP Script

DZone's Guide to

Get All Variables Declared In A PHP Script

·
Free Resource
This will output all declared vars & their assigned values.


$vars = get_defined_vars();
print_r($vars);
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}