3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = "sfid=sdfdsfdsf,ra=dsfdsfdsfds,sa=dsfdsfdsf,lo=swerwrwer"; /* Use tab and newline as tokenizing characters as well */ $tok = strtok($string, " ,="); while ($tok !== false) { echo "Word=$tok<br />"; $tok = strtok(" \n\t"); } ?>
Output for 4.3.0 - 7.1.7
Word=sfid<br />Word=sdfdsfdsf,ra=dsfdsfdsfds,sa=dsfdsfdsf,lo=swerwrwer<br />