PHP5 Beta4 and XML

John Lim has been documenting his experiences with PHP5 beta 4 and has some encouraging things to say about performance and simplexml.

With PHP5 now using libxml2 for all XML support, “things” are looking very interesting. Christian Stocker, who works on the DOM extension (and happens to work down the road from me, so get’s harassed…) gave this presentation recently on the new features.

One to watch is what’s happening in this slide. The example doesn’t really make it clear how much potential being able to use streams with XML has but what it means is something like this could be possible;

Where the “Page://title refers” to;

class Page {
var $title;
function title() {
return $this->title;

…via stream_wrapper_register(). More on that another time.

On the downside, Christian also found a problem with namespaces which he doesn’t have time to fix, meaning PHP5 will probably ship without xml_parser_create_ns(). If that matters to your business, you know who to hire to fix it…