3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $separator = "\r\n"; $subject = "test1\ntest2\n"; $line = strtok($subject, $separator); while ($line !== false) { echo $line; $line = strtok( $separator ); }
based on 5boG3
Output for 4.3.0 - 7.2.0
test1test2