3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class C { protected $foo; private $bar; } $obj = unserialize('O:1:"C":2:{s:6:"*foo";i:42;s:6:"*bar";s:5:"hello";}'); var_dump($obj);
based on RBY7X
Output for 5.0.3 - 7.1.0
Notice: unserialize(): Error at offset 22 of 51 bytes in /in/B5OGn on line 8 bool(false)
Output for 5.0.0 - 5.0.2
Notice: unserialize(): Error at offset 24 of 51 bytes in /in/B5OGn on line 8 bool(false)
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/B5OGn on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/B5OGn on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/B5OGn on line 4
Process exited with code 255.