3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = 'There is something to type here. This is an example text'; echo preg_replace( '~((?:\S*?\s){5})~', "$1\n", $str );
Output for 4.3.0 - 7.2.6
There is something to type here. This is an example text