3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Token implements \Serializable { public function serialize() {} public function unserialize($str) { $r = unserialize($str); unserialize($r[2]); } } $token = file_get_contents('string2.txt'); $obj = unserialize($token);
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: file_get_contents(string2.txt): failed to open stream: No such file or directory in /in/Mgsvi on line 15
Output for hhvm-3.10.0 - 3.12.0
Warning: No such file or directory in /in/Mgsvi on line 15
Output for 5.2.0 - 5.2.17
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/Mgsvi on line 3 Warning: file_get_contents(string2.txt): failed to open stream: No such file or directory in /in/Mgsvi on line 15
Output for 5.1.0 - 5.1.6
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/Mgsvi on line 3 Warning: file_get_contents(string2.txt): failed to open stream: No such file or directory in /in/Mgsvi on line 15 Notice: unserialize(): Argument is not a string in /in/Mgsvi on line 16
Output for 5.0.5
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/Mgsvi on line 3 Fatal error: Interface 'Serializable' not found in /in/Mgsvi on line 3
Process exited with code 255.
Output for 5.0.0 - 5.0.4
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /in/Mgsvi on line 3 Fatal error: Class 'Serializable' not found in /in/Mgsvi on line 3
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting '{' in /in/Mgsvi on line 3
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 '{' in /in/Mgsvi on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `'{'' in /in/Mgsvi on line 3
Process exited with code 255.