????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.216.36 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/php-5.6.22/Zend/tests/ |
Upload File : |
--TEST--
debug_backtrace options
--FILE--
<?php
function backtrace_print($opt = null)
{
if(is_null($opt)) {
print_r(debug_backtrace());
} else {
print_r(debug_backtrace($opt));
}
}
function doit($a, $b, $how)
{
echo "==default\n";
$how();
echo "==true\n";
$how(true);
echo "==false\n";
$how(false);
echo "==DEBUG_BACKTRACE_PROVIDE_OBJECT\n";
$how(DEBUG_BACKTRACE_PROVIDE_OBJECT);
echo "==DEBUG_BACKTRACE_IGNORE_ARGS\n";
$how(DEBUG_BACKTRACE_IGNORE_ARGS);
echo "==both\n";
$how(DEBUG_BACKTRACE_PROVIDE_OBJECT|DEBUG_BACKTRACE_IGNORE_ARGS);
}
class foo {
protected function doCall($dowhat, $how)
{
$dowhat('a','b', $how);
}
static function statCall($dowhat, $how)
{
$obj = new self();
$obj->doCall($dowhat, $how);
}
}
foo::statCall("doit", "debug_print_backtrace");
foo::statCall("doit", "backtrace_print");
?>
--EXPECTF--
==default
#0 doit(a, b, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
#1 foo->doCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
#2 foo::statCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
==true
#0 doit(a, b, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
#1 foo->doCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
#2 foo::statCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
==false
#0 doit(a, b, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
#1 foo->doCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
#2 foo::statCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
==DEBUG_BACKTRACE_PROVIDE_OBJECT
#0 doit(a, b, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
#1 foo->doCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
#2 foo::statCall(doit, debug_print_backtrace) called at [%sdebug_backtrace_options.php:%d]
==DEBUG_BACKTRACE_IGNORE_ARGS
#0 doit() called at [%sdebug_backtrace_options.php:%d]
#1 foo->doCall() called at [%sdebug_backtrace_options.php:%d]
#2 foo::statCall() called at [%sdebug_backtrace_options.php:%d]
==both
#0 doit() called at [%sdebug_backtrace_options.php:%d]
#1 foo->doCall() called at [%sdebug_backtrace_options.php:%d]
#2 foo::statCall() called at [%sdebug_backtrace_options.php:%d]
==default
Array
(
[0] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => backtrace_print
[args] => Array
(
)
)
[1] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => doit
[args] => Array
(
[0] => a
[1] => b
[2] => backtrace_print
)
)
[2] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => doCall
[class] => foo
[object] => foo Object
(
)
[type] => ->
[args] => Array
(
[0] => doit
[1] => backtrace_print
)
)
[3] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => statCall
[class] => foo
[type] => ::
[args] => Array
(
[0] => doit
[1] => backtrace_print
)
)
)
==true
Array
(
[0] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => 17
[function] => backtrace_print
[args] => Array
(
[0] => 1
)
)
[1] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => doit
[args] => Array
(
[0] => a
[1] => b
[2] => backtrace_print
)
)
[2] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => doCall
[class] => foo
[object] => foo Object
(
)
[type] => ->
[args] => Array
(
[0] => doit
[1] => backtrace_print
)
)
[3] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => statCall
[class] => foo
[type] => ::
[args] => Array
(
[0] => doit
[1] => backtrace_print
)
)
)
==false
Array
(
[0] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => 19
[function] => backtrace_print
[args] => Array
(
[0] =>
)
)
[1] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => doit
[args] => Array
(
[0] => a
[1] => b
[2] => backtrace_print
)
)
[2] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => doCall
[class] => foo
[type] => ->
[args] => Array
(
[0] => doit
[1] => backtrace_print
)
)
[3] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => statCall
[class] => foo
[type] => ::
[args] => Array
(
[0] => doit
[1] => backtrace_print
)
)
)
==DEBUG_BACKTRACE_PROVIDE_OBJECT
Array
(
[0] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => 21
[function] => backtrace_print
[args] => Array
(
[0] => 1
)
)
[1] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => doit
[args] => Array
(
[0] => a
[1] => b
[2] => backtrace_print
)
)
[2] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => doCall
[class] => foo
[object] => foo Object
(
)
[type] => ->
[args] => Array
(
[0] => doit
[1] => backtrace_print
)
)
[3] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => statCall
[class] => foo
[type] => ::
[args] => Array
(
[0] => doit
[1] => backtrace_print
)
)
)
==DEBUG_BACKTRACE_IGNORE_ARGS
Array
(
[0] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => 23
[function] => backtrace_print
)
[1] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => doit
)
[2] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => doCall
[class] => foo
[type] => ->
)
[3] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => statCall
[class] => foo
[type] => ::
)
)
==both
Array
(
[0] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => 25
[function] => backtrace_print
)
[1] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => doit
)
[2] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => doCall
[class] => foo
[object] => foo Object
(
)
[type] => ->
)
[3] => Array
(
[file] => %sdebug_backtrace_options.php
[line] => %d
[function] => statCall
[class] => foo
[type] => ::
)
)