Get all $vars from a function()
Posted: Sun Jan 25, 2004 5:14 pm
Does anyone know if it's possible to get a list of all the variables in a function() regardless of if they were predefined of dynamically created?
It would be very handy to know.
Code: Select all
<?php
// An example.
function EatVars()
{
$a = "apple";
$b = "banana";
${$a} = "{$a} pie";
}
$allVars = somehow_get_all_vars_from_EatVars_into_an_array;
echo count($allVars);
?>