3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $limit = 1000000000; $string = 'a'; for ( $i = 0; $i <= $limit; $i++ ) { $string .= 'a'; } echo strlen($string)."\n"; $str2=preg_replace('#(?<name>.)*#', '', $string); echo 'done';
based on sRWQa
Output for 7.0.0 - 7.2.0
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 31457288 bytes) in /in/cJ4Pa on line 6
Process exited with code 255.
Output for 5.3.18 - 5.4.45, 5.5.25 - 5.6.28

Process exited with code 137.
Output for 5.5.24
Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 66846673 bytes) in /in/cJ4Pa on line 6
Process exited with code 255.