Skip to content

Instantly share code, notes, and snippets.

@caiotava
Last active May 25, 2017 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save caiotava/8a303e4177f6f8a47f566762c99403a7 to your computer and use it in GitHub Desktop.
Save caiotava/8a303e4177f6f8a47f566762c99403a7 to your computer and use it in GitHub Desktop.
<?php
# command line php -d xdebug.profiler_enable=On -d xdebug.profiler_output_dir=.
ini_set('xdebug.default_enable', 1);
ini_set('xdebug.collect_params', 3);
ini_set('xdebug.collect_return', 1);
xdebug_start_trace('debug');
class XClass {
public static function foo($params)
{
return 'foo';
}
public static function bar($param)
{
return 'bar';
}
public static function baz($param)
{
return 'baz';
}
public static function nested($param)
{
return static::foo($param) . static::bar($param) . static::baz($param);
}
}
XClass::foo('test');
XClass::bar('test');
XClass::baz('test');
XClass::nested('asdrubal');
echo xdebug_stop_trace() . PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment