News Archive
PhpRiot Newsletter
Your Email Address:

More information

10 years of Xdebug and Xdebug 2.2.0 released

Note: This article was originally published at Planet PHP on 17 April 2000.
Planet PHP

10 years of Xdebug and Xdebug 2.2.0 released

London, UK Tuesday, May 8th 2012, 14:00 BST

Today it has been ten years since the first release of Xdebug: version 0.7.0. I would like to celebrate this tenth anniversary with a new release: Xdebug 2.2.0. Xdebug 2.2 adds support for PHP 5.4 and provides some new features:

Colours on the command line

First of all there is now var_dump() overloading and colours on the command line. I've already written about that before, but here are the screenshots again:



You can find an article about this here.

Better support for closures in stack and function traces

Closures are functions that don't have a function name associated with them. Therefore, Xdebug creates a pseudo function in its stack traces. The stack trace for this example:

Looks like:

Notice: foo in /tmp/closure-stack-trace.php on line 21 Call Stack: 0.0009 268464 1. {main}() /tmp/closure-stack-trace.php:0 0.0026 269288 2. test1() /tmp/closure-stack-trace.php:27 0.0032 270024 3. {closure:/tmp/closure-stack-trace.php:19-22}($a = 5, $b = 25) /tmp/closure-stack-trace.php:24 0.0038 270496 4. trigger_error('foo') /tmp/closure-stack-trace.php:21

In the 3rd line in the call stack you see {closure:/tmp/closure-stack-trace.php:19-22}($a = 5, $b = 25) where /tmp/closure-stack-trace.php:19-22 contains the filename and line numbers on which the closure is defined at.

The size of arrays is now shown with the overloaded variable output

After this change, each array in the html version of the overloaded var_dump() function now looks like:

array (size=5)

Before the change, this was only:


Added the method call type to xdebug_get_function_stack

This changes adds another array element to xdebug_get_function_stack() to show whether it was a static or dynamic function call. For example, for:

new Error_Entry(false, $errno);

It now adds the ["type"]= string(7) "dynamic" element to each stack element:

array(6) { ["function"]= string(11) "__construct" ["type"]= string(7) "dynamic" ["class"]= string(11) "Error_Entry" ["file"]= string(%d) "%sbug00241.php" ["line"]= int(11)

Extra information to error printouts to tell that the error suppression operator has been ignored due to xdebug.scream

When you have the xdebug.scream option activated, Xdebug will now tell you when it had any effect on the error reporting with a big "SCREAM: Error suppression ignored for" warning prepended to the actual error message.


You can find the full changelog for Xdebug 2.2.0 at the Xdebug website where you can also download the latest version. If you are using Windows, and don't know which binary to download, please refer to the wizard.


If you find Xdebug valuable for your PHP development, perhaps you want to support its development by acquiring a "support" contract. See the buying "support" page if you feel generous.

Truncated by Planet PHP, read more at the original (another 754 bytes)