Files
archived-presentations/slides/xdebug/xdebug-get-function-stack-local-vars.xml
Derick Rethans 0be7231ae8 IPC 23 talks
2023-10-20 15:14:30 +01:00

31 lines
604 B
XML

<slide>
<title>xdebug_get_function_stack() - local variables</title>
<example result="1"><![CDATA[
<?php
class Elephpant
{
function __construct(private string $title, private float $PIE) {}
}
class Error_Class
{
public static function getBT()
{
$tmp = xdebug_get_function_stack( ['local_vars' => true ] );
var_dump(array_reverse($tmp));
}
public static function newError($errno = false)
{
$elephpant = new Elephpant("Bluey", M_PI);
$randoVar = 42;
return self::getBT();
}
}
$e = Error_Class::newError(42);
?>
]]></example>
</slide>