3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = 'foo.bar'; echo strtok($a, '.') .' | '. $a .' | '. strtok($a, ''); $a = 'foo'; echo strtok($a, '.') .' | '. $a .' | '. strtok($a, '');
based on 4qebX
Output for 4.3.0 - 7.2.0
foo | foo.bar | foo.barfoo | foo | foo