apd_breakpoint

(PECL apd >= 0.2)

apd_breakpointStops the interpreter and waits on a CR from the socket

说明

apd_breakpoint ( int $debug_level ) : bool

This can be used to stop the running of your script, and await responses on the connected socket. To step the program, just send enter (a blank line), or enter a php command to be executed.

参数

debug_level

由加上 XXX_TRACE 常量而形成的整数。

不建议使用 MEMORY_TRACE。这会很慢且似乎不精确。 ASSIGNMENT_TRACE 还未被实现。

要打开所有跟踪功能(TIMING, FUNCTIONS, ARGS SUMMARY (比如 strace -c)) 则使用 99 作为值。

返回值

成功时返回 TRUE, 或者在失败时返回 FALSE

范例

Example #1 Typical session using tcplisten

bash#tcplisten localhost 7777

APD - Advanced PHP Debugger Trace File
---------------------------------------------------------------------------
Process Pid (6118)
Trace Begun at Sun Mar 10 23:13:12 2002
---------------------------------------------------------------------------
(  0.000000): apd_set_session_trace called at /home/alan/Projects/project2/test. 
php:5
(  0.074824): apd_set_session_trace_socket() at /home/alan/Projects/project2/tes 
t.php:5 returned.  Elapsed (0.074824)
(  0.074918): apd_breakpoint() /home/alan/Projects/project2/test.php:7
              ++ argv[0] $(??) = 9
apd_breakpoint() at /home/alan/Projects/project2/test.php:7 returned.  Elapsed ( 
-2089521468.1073275368)
>\n 
statement: /home/alan/Projects/project2/test.php:8
>\n 
statement: /home/alan/Projects/project2/test.php:8
>\n 
statement: /home/alan/Projects/project2/test.php:10
>apd_echo($i);
EXEC: apd_echo($i);
0
>apd_echo(serialize(apd_get_active_symbols()));
EXEC:  apd_echo(serialize(apd_get_active_symbols()));
a:47:{i:0;s:4:"PWD";i:1;s:10:"COLORFGBG";i:2;s:11:"XAUTHORITY";i:3;s:14:"
COLORTERM_BCE";i:4;s:9:"WINDOWID";i:5;s:14:"ETERM_VERSION";i:6;s:16:"SE
SSION_MANAGER";i:7;s:4:"PS1";i:8;s:11:"GDMSESSION";i:9;s:5:"USER";i:10;s:5:"
MAIL";i:11;s:7:"OLDPWD";i:12;s:5:"LANG";i:13;s:10:"COLORTERM";i:14;s:8:"DISP
LAY";i:15;s:8:"LOGNAME";i:16;s:6:"
>apd_echo(system('ls /home/mydir'));
........
>apd_continue(0);

相关文章
php apd 函数 stops the interpreter and waits on a cr from the socketphp apd 函数 restarts the interpreterphp apd 函数 echo to the debugging socketphp expect 函数 waits until the output from a process matches one of the patterns a specified time period has passed or an eof is seenphp ncurses 函数 reads a character from keyboard window php newt 函数 removes the top window from the displayphp oci8 函数 returns the next child statement resource from a parent statement resource that has oracle database 12c implicit result setsphp postgresql 函数 submits a command to the server and waits for the result with the ability to pass parameters separately from the sql command textphp postgresql 函数 get a read only handle to the socket underlying a postgresql connectionphp rrd 函数 gets the timestamp of the first sample from rrd filephp runkit 函数 specify a function to capture and/or process output from a runkit sandboxphp semaphore 函数 disconnects from shared memory segmentphp socket 函数 create and bind to a socket from a given addrinfophp socket 函数 create and connect to a socket from a given addrinfophp socket 函数 queries the local side of the given socket which may either result in host/port or in a unix filesystem path dependent on its typephp socket 函数 reads a maximum of length bytes from a socketphp socket 函数 receives data from a socket whether or not it is connection orientedphp ssdeep 函数 create a fuzzy hash from a filephp statistic 函数 generates a single random deviate from a poisson distributionphp stream 函数 receives data from a socket connected or not
关注编程学问公众号