- var_dump: documentation ( source)
- get_defined_vars: documentation ( source)
- print_r: documentation ( source)
<?php
$aa = 'str2';
function doom(){
$a = 'str';
$b = 2;
return print_r(get_defined_vars(),true);
}
echo doom();
var_dump(get_defined_vars());