3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class foo extends DOMElement implements Serializable { public function serialize() {return 'foo';} public function unserialize($serialized) {$this->__construct('span','test');} } $Document = new DOMDocument('1.0'); $Document->registerNodeClass('DOMElement', 'foo'); $Document->loadHTML('<span>test</span>'); $Element = $Document->lastChild->lastChild->firstChild; var_dump($Element, serialize($Element), unserialize(serialize($Element))));
Output for 5.3.0 - 5.4.26
Parse error: syntax error, unexpected ')' in /in/GdNfa on line 15
Process exited with code 255.