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**31);
based on 5QDF7
Output for 7.0.0 - 7.3.0alpha1
string(3) "64M" string(3) "16K" Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 2147483680 bytes) in /in/n9sr7 on line 6
Process exited with code 255.
Output for 5.6.9 - 5.6.28
string(3) "64M" string(3) "16K" Warning: str_repeat(): Result is too big, maximum 2147483647 allowed in /in/n9sr7 on line 6
Output for 5.6.8
string(3) "64M" string(3) "16K" Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 2147483649 bytes) in /in/n9sr7 on line 6
Process exited with code 255.
Output for 5.3.21 - 5.5.35
Parse error: syntax error, unexpected '*' in /in/n9sr7 on line 6
Process exited with code 255.