• Search:



Planet eZ publish




netgen

› February @ Netgen

February passed by quickly, and not only because of it being the shortest month in the year. :) We were submerged in work, with a few big projects on the way, but still able to contribute to the community!

04/03/2015 3:42 pm (UTC)   http://www.netgenlabs.com/Blog   View entry   Digg!  digg it!   del.icio.us  del.icio.us

netgen

› February @ Netgen

February passed by quickly, and not only because of it being the shortest month in the year. :) We were submerged in work, with a few big projects on the way, but still able to contribute to the community!

04/03/2015 3:42 pm (UTC)   http://www.netgenlabs.com/Blog   View entry   Digg!  digg it!   del.icio.us  del.icio.us

ez publish community gateway

› Farewell eZ Publish legacy, welcome eZ Platform

Friday 13th of February turned out quite interesting for the engineering team in Lyon. In addition to being the last day before moving from an office eZ has had since 2006, we managed to merge what I think is a pretty major change: eZ Publish legacy isn't included by default anymore. In addition, eZ Platform has a prototype of its own native installer, and the new backoffice prototype, Platform UI, is now bundled by default.

03/03/2015 4:59 pm (UTC)   http://share.ez.no   View entry   Digg!  digg it!   del.icio.us  del.icio.us

derick rethans

› Xdebug 2.3: Enhanced xdebug_debug_zval()

Xdebug 2.3: Enhanced xdebug_debug_zval()

This is the second article in a series about the new features in Xdebug 2.3, which was first released on February 22nd.

xdebug_debug_zval() has been around for quite some time, to provide correct information about how PHP internally stores a variable. Unlike PHP's built in debug_zval_dump() function, it does not modify the variable information that it tries to show. This is because instead of passing in a variable, you pass in its name. Passing a variable into a function, can modify the various parameters that are associated with this variable, such as the is_ref and refcount fields.

xdebug_debug_zval() does not suffer from these inadvertent modifications, as you pass in the variable's name, and the function looks up the information about a variable in the symbol tables itself.

The difference becomes clear with the following two examples. With debug_zval_dump():



Which outputs (after a little formatting):

array(3) refcount(1){
        [0]=> long(1) refcount(2)
        [1]=> long(2) refcount(2)
        [2]=> &long(3) refcount(3)
}

And with xdebug_debug_zval():



Which outputs (after a little formatting):

a: (refcount=2, is_ref=1)=array (
        0 => (refcount=1, is_ref=0)=1,
        1 => (refcount=1, is_ref=0)=2,
        2 => (refcount=2, is_ref=1)=3
)

In the debug_zval_dump() example, the refcounts for the array elements are all one too high, and the refcount for the array itself is one too low. The array is also not marked as reference.

However, before Xdebug 2.3, the xdebug_debug_zval() function would only accept a variable name, but not any array subscripts or property deferences. Meaning that you couldn't really dump a sub array. Xdebug 2.3 adds support for dereferencing properties and array elements by reusing the variable name parser of the remote debugging. Hence, you can now do the following:



Which outputs:

a[2]: (refcount=2, is_ref=1)=3

Or:

prop = [3.14, 2.72];

xdebug_debug_zval('a->prop');
xdebug_debug_zval('a->prop[1]');
?>

Which outputs:

a->prop: (refcount=1, is_ref=0)=array (
        0 => (refcount=1, is_ref=0)=3.14,
        1 => (refcount=1, is_ref=0)=2.72
)
a->prop[1]: (refcount=1, is_ref=0)=2.72


Other parts in this series:

03/03/2015 10:44 am (UTC)   Derick Rethans   View entry   Digg!  digg it!   del.icio.us  del.icio.us

derick rethans

› Xdebug 2.3: Moar var_dump()

Xdebug 2.3: Moar var_dump()

This is the first article in a series about the new features in Xdebug 2.3, which was first released on February 22nd.

One of the new features relates to one of the first things that I added in the original Xdebug: making the var_dump() output "pretty". Xdebug replaces PHP's standard var_dump() function with its own version, as long as the xdebug.overload_var_dump setting is not set to 0.

Which means that instead of:

array(4) { [0]=> int(42) [1]=> string(6) "string" [2]=> bool(true) [3]=> float(3.1415926535898) }

You get:

Nothing new so far.

Xdebug 2.3 enhances the overloading of var_dump() with the inclusion of the file name and line number where var_dump() is called at. This has been a long standing feature request.

You can include this information, by setting xdebug.overload_var_dump to 2. If the xdebug.overload_var_dump setting is set to 2, the overloaded var_dump() output now looks like:

As you can see, the file name and line number of where var_dump() were called are prepended to the output.

An already existing setting, xdebug.file_link_format, allows you to format file name and line number information so that Xdebug generates a link. This same setting is also respected by the inclusion of the file name and line number in the enhanced var_dump() output. Setting xdebug.file_link_format to xdebug://%f:%l will then link the file name to xdebug:///home/httpd/html/test/xdebug/overload-var-dump.php:4. If we look at this as an image, we will see:

In a future version of Xdebug, it is likely that I will either wrap in the file name/line number information in the overloaded var_dump(), or change the default value of the setting to 2.

27/02/2015 9:57 am (UTC)   Derick Rethans   View entry   Digg!  digg it!   del.icio.us  del.icio.us

ez publish community gateway

› Digital marketing tips for business owners

An article about marketing news.

26/02/2015 12:29 pm (UTC)   http://share.ez.no   View entry   Digg!  digg it!   del.icio.us  del.icio.us

ez publish community gateway

› Announcing The eZ Publish Show iTunes Podcast

The eZ Publish Show is a live hangout covering all the topics concerning the eZ Publish since 2012. So far 23 episodes have been aired, featuring many known eZ experts and a few special guests. Geoff Bentley was the original host, and I took over starting with the episode 12.

13/02/2015 4:21 pm (UTC)   http://share.ez.no   View entry   Digg!  digg it!   del.icio.us  del.icio.us

netgen

› Announcing The eZ Publish Show iTunes Podcast

The eZ Publish Show is a live hangout covering all the topics concerning the eZ Publish since 2012. So far 23 episodes have been aired, featuring many known eZ experts and a few special guests. Geoff Bentley was the original host, and our colleague Ivo took over starting with the episode 12.

13/02/2015 3:27 pm (UTC)   http://www.netgenlabs.com/Blog   View entry   Digg!  digg it!   del.icio.us  del.icio.us

netgen

› January @ Netgen

After giving the 2014 a proper send-off, we started the new 2015 in a good rhythm. So, what did we do this January?

05/02/2015 3:37 pm (UTC)   http://www.netgenlabs.com/Blog   View entry   Digg!  digg it!   del.icio.us  del.icio.us

netgen

› The eZ Publish Show #23: Chunky Content

I had a very special guest this week’s in the last episode of The eZ Publish Show. Karen McGrane, one of the thought leaders in the content strategy domain, joined the hangout. She regularly holds lectures at the conferences and her latest book is “Content strategy for mobile”, really a star in the content field :). It was also great to have my colleague Igor Vrdoljak on the hangout as he is very passionate about all things related to content. Read on.

30/01/2015 5:53 pm (UTC)   http://www.netgenlabs.com/Blog   View entry   Digg!  digg it!   del.icio.us  del.icio.us