September 2001
Intermediate to advanced
768 pages
32h 45m
English
array get_defined_vars(void)
Fetch a list of all variables in the current scope.
Returns:
Associative array
Description:
get_defined_vars() returns an associative array that contains the names and values of all variables set in the current scope. The variable names are used as the key names, while the variable values are used as the array values.
Arrays and objects are rendered as nested arrays. See the following examples.
Note:
The array contains all variables set with the exception of the special variable $GLOBALS.
Version:
PHP 4.0.4+
Examples:
<?php
print_r (get_defined_vars ());
?>
Output is too long to display!
|
<?php class foo { var $bar, $baz; function ... |
Read now
Unlock full access