3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $pattern = '/a/'; $limit = 10000; $string = 'a'; for ( $i = 0; $i <= $limit; $i++ ) { $string .= 'a'; //echo strlen($string) . "\n"; //echo mb_strlen($string); } echo strlen($string)."\n"; $str2=preg_replace('#(\w)*#', '', $string); echo $str2."\n"; echo 'done';
based on CWTGg
Output for 7.0.0 - 7.2.0
10002 done
Output for 5.3.18 - 5.6.28
10002
Process exited with code 139.