3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $result = array(); for($i=0;$i<1000000;$i++) { $result[] = array('member0'=>0,'member1'=>1,'member2'=>2,'member3'=>3); } echo 'Memory: '.memory_get_usage()."\n";
Output for 7.1.0
Memory: 33905848
Output for 7.0.0 - 7.0.14
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 20480 bytes) in /in/h9gQL on line 4
Process exited with code 255.
Output for hhvm-3.10.0 - 3.13.2
Memory: 4194304
Output for 5.3.0 - 5.6.28
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 32 bytes) in /in/h9gQL on line 4
Process exited with code 255.