3v4l.org

run code in 150+ 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(" ,="); } ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Word=sfid<br />Word=sdfdsfdsf<br />Word=ra<br />Word=dsfdsfdsfds<br />Word=sa<br />Word=dsfdsfdsf<br />Word=lo<br />Word=swerwrwer<br />