3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A implements Serializable(){ protected $_a = 'Aze'; function serialize(){ return serialize(array('a' => $this->_a)); } function unserialize($s){ $d = unserialize($s); $_a = $d['a']; } } $a = new A(); $s = serialize($a); var_dump($s); $b = unserialize($b); var_dump($b);
Output for 5.3.0 - 5.4.26
Parse error: syntax error, unexpected '(', expecting '{' in /in/3FIMq on line 3
Process exited with code 255.