3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Dummy { public $input; function __construct($input = array(1,2,3)) { $this->input = $input; } function run() { foreach($this->input as $key=>$value) { if($key == 2) throw new Exception('hello exception'); } } } function retry(Dummy $dum) { try { $dum->run(); } catch(Exception $e) { // solve the exception //if($dum->input[2]) //unset($dum->input[2]); retry($dum); } } $dum = new Dummy; retry($dum);
Output for 7.0.0 - 7.1.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in /in/q1ZBK on line 13
Process exited with code 255.
Output for hhvm-3.12.0
mallctl opt.prof: No such file or directory (2) Fatal error: request has exceeded memory limit
Process exited with code 255.
Output for hhvm-3.10.0
Fatal error: request has exceeded memory limit
Process exited with code 255.
Output for 5.5.24 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 77 bytes) in /in/q1ZBK on line 13
Process exited with code 255.
Output for 5.4.0 - 5.4.45
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 81 bytes) in /in/q1ZBK on line 13
Process exited with code 255.
Output for 5.3.11 - 5.3.29
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 72 bytes) in /in/q1ZBK on line 13
Process exited with code 255.
Output for 5.3.7 - 5.3.10
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 71 bytes) in /in/q1ZBK on line 13
Process exited with code 255.