diff --git a/bin/xhprofile b/bin/xhprofile new file mode 120000 --- /dev/null +++ b/bin/xhprofile @@ -0,0 +1 @@ +../scripts/xhprofile.php \ No newline at end of file diff --git a/extension/tests/xhprof_009.phpt b/extension/tests/xhprof_009.phpt new file mode 100644 --- /dev/null +++ b/extension/tests/xhprof_009.phpt @@ -0,0 +1,19 @@ +--TEST-- +XHPRrof: PHP 5.5 crash in hp_execute_internal +Author: epriestley +--FILE-- + +} + +spl_autoload_register('loader', $throw = true); + +xhprof_enable(); + +class_exists('ThisClassDoesNotExist'); +echo "OK\n"; + +--EXPECT-- +OK diff --git a/scripts/xhprofile.php b/scripts/xhprofile.php new file mode 100755 --- /dev/null +++ b/scripts/xhprofile.php @@ -0,0 +1,19 @@ +#!/usr/bin/env php +'); +} + +$__xhprof_target__ = $argv[1]; + +$argv = array_slice($argv, 1); +$argc = count($argv); + +xhprof_enable(); +require_once $__xhprof_target__; +$xhprof_data = xhprof_disable(); + +var_dump($xhprof_data);