3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "This is an example string"; $token = strtok($string, " "); while ($token !== false) { echo $token . PHP_EOL; $token = strtok(" "); }

preferences:
27.77 ms | 404 KiB | 5 Q