3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(ini_get('memory_limit')); ini_set('memory_limit', '16M'); var_dump(ini_get('memory_limit')); str_repeat('a', 2 << 28);
based on QrOLJ
Output for 7.0.0 - 7.2.0
string(3) "64M" string(3) "16M" Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 536870944 bytes) in /in/ruFeq on line 6
Process exited with code 255.
Output for 5.3.21 - 5.6.28
string(3) "64M" string(3) "16M" Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 536870913 bytes) in /in/ruFeq on line 6
Process exited with code 255.