3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { private $view = "bar"; public function getView() { return $this->view; } } $a = unserialize(file_get_contents("/tmp/test.tmp")); var_dump($a, $a->getView());
Output for 7.0.4 - 7.0.5, 7.0.14 - 7.1.0
Warning: file_get_contents(/tmp/test.tmp): failed to open stream: No such file or directory in /in/oaIl2 on line 12 Fatal error: Uncaught Error: Call to a member function getView() on boolean in /in/oaIl2:14 Stack trace: #0 {main} thrown in /in/oaIl2 on line 14
Process exited with code 255.
Output for 7.0.0 - 7.0.3, 7.0.6
Notice: unserialize(): Error at offset 0 of 3 bytes in /in/oaIl2 on line 12 Fatal error: Uncaught Error: Call to a member function getView() on boolean in /in/oaIl2:14 Stack trace: #0 {main} thrown in /in/oaIl2 on line 14
Process exited with code 255.
Output for hhvm-3.12.0
Notice: Unable to unserialize: [123]. Expected ':' but got '2'. in /in/oaIl2 on line -1 Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function getView() on a non-object (boolean)' in /in/oaIl2:-1 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.0
Notice: Unable to unserialize: [123]. Expected ':' but got '2'. in /in/oaIl2 on line 12 Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function getView() on a non-object (boolean)' in /in/oaIl2:14 Stack trace: #0 {main}
Process exited with code 255.
Output for 5.6.7, 5.6.10, 5.6.13, 5.6.18 - 5.6.19, 5.6.21 - 5.6.28
Warning: file_get_contents(/tmp/test.tmp): failed to open stream: No such file or directory in /in/oaIl2 on line 12 Fatal error: Call to a member function getView() on boolean in /in/oaIl2 on line 14
Process exited with code 255.
Output for 5.6.8 - 5.6.9, 5.6.11 - 5.6.12, 5.6.14 - 5.6.17, 5.6.20
Notice: unserialize(): Error at offset 0 of 3 bytes in /in/oaIl2 on line 12 Fatal error: Call to a member function getView() on boolean in /in/oaIl2 on line 14
Process exited with code 255.
Output for 5.2.0 - 5.4.45, 5.5.29, 5.5.35
Warning: file_get_contents(/tmp/test.tmp): failed to open stream: No such file or directory in /in/oaIl2 on line 12 Fatal error: Call to a member function getView() on a non-object in /in/oaIl2 on line 14
Process exited with code 255.
Output for 5.5.24 - 5.5.28, 5.5.30 - 5.5.34
Notice: unserialize(): Error at offset 0 of 3 bytes in /in/oaIl2 on line 12 Fatal error: Call to a member function getView() on a non-object in /in/oaIl2 on line 14
Process exited with code 255.
Output for 5.0.3 - 5.1.6
Warning: file_get_contents(/tmp/test.tmp): failed to open stream: No such file or directory in /in/oaIl2 on line 12 Notice: unserialize(): Argument is not a string in /in/oaIl2 on line 12 Fatal error: Call to a member function getView() on a non-object in /in/oaIl2 on line 14
Process exited with code 255.
Output for 5.0.0 - 5.0.2
Warning: file_get_contents(/tmp/test.tmp): failed to open stream: No such file or directory in /in/oaIl2 on line 12 Notice: unserialize(): Argument is not an string in /in/oaIl2 on line 12 Fatal error: Call to a member function getView() on a non-object in /in/oaIl2 on line 14
Process exited with code 255.
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/oaIl2 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/oaIl2 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/oaIl2 on line 4
Process exited with code 255.