3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $sentence = "My\nString\r\nIs here\rHeh"; print_r( preg_split('/\R/', $sentence) );
Output for 4.4.6 - 4.4.9, 5.2.2 - 7.1.0
Array ( [0] => My [1] => String [2] => Is here [3] => Heh )
Output for 4.3.0 - 4.4.5, 5.0.0 - 5.2.1
Array ( [0] => My String Is here Heh )