3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class test { private $number; function __construct($int) { $this->number = $int; } } $i = 100; $test = array(); $string = ""; while ($i >1) { $string .= $i; $i-1; $test[] = new test($i); } echo count($test); echo "<br><br>".$string;
based on K1G2j
Output for 7.0.0 - 7.2.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 33554440 bytes) in /in/KPZ85 on line 16
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 645523 bytes) in /in/KPZ85 on line 14
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 645514 bytes) in /in/KPZ85 on line 14
Process exited with code 255.
Output for 5.3.18 - 5.3.29
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 373465 bytes) in /in/KPZ85 on line 14
Process exited with code 255.