PHP 5.6 introduces phpdbg, which is a new SAPI—Server API—for debugging PHP code.
Unlike existing debugging solutions, such as xdebug, and Zend Debugger, which are extensions and run within your standard SAPI—be that a web server like Nginx, or Apache, or on the CLI, phpdbg is completely standalone as it’s own fully-contained SAPI.
phpdbg is similar to the traditional C-debugger,
gdb with support for step-through debugging, code disassembly, and remote debugging.
To install phpdbg, simply specify
--enable-phpdbg at compile time. To further enhance phpdbg, you should also specify
For Mac OS X, which ships with the alternative
libedit, you can install readline with homebrew (see: http://brew.sh) ...