3v4l.org

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