3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class test { public $inner = NULL; protected $prot = 1; private $priv = 2; } $one = new test; $two = new test; $one->inner = $two; $two->inner = $one; for($i = 100; $i > 0; $i--) { $serialized = preg_replace('/O:\d:"([^"]*)":/i', 'O:8:"stdClass":', serialize($one)); $storage = json_encode(unserialize(preg_replace_callback('/s:(\d+):"\x00([^"\x00]+)\x00([^"]+)"/i', function($matches) { return 's:'.($matches[1]-(strlen($matches[2])+2)).':"'.$matches[3].'"'; }, $serialized))); }
based on WkL3j
Output for 5.5.0 - 7.1.0
Output for 5.3.0 - 5.4.45
Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18 Warning: json_encode(): recursion detected in /in/hVhRY on line 18
Output for 5.1.0 - 5.2.17
Parse error: syntax error, unexpected T_FUNCTION in /in/hVhRY on line 17
Process exited with code 255.
Output for 5.0.0 - 5.0.5
Parse error: parse error, unexpected T_FUNCTION in /in/hVhRY on line 17
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/hVhRY 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/hVhRY 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/hVhRY on line 4
Process exited with code 255.