3v4l.org

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