3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo implements Serializable { protected $var1; public function setObject($obj) { $this->var1 = array('ROLE_DEVELOPER'); } public function serialize() { return serialize(array($this->var1)); } public function unserialize($serialized) { list($this->var1) = unserialize($serialized); } } $foo = new Foo; var_dump(unserialize(serialize($foo));
Output for 5.3.0 - 5.4.22
Parse error: syntax error, unexpected ';' in /in/ea3CF on line 22
Process exited with code 255.