3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function tokenize($str, $token) { $tokenizedStrArr = array(); $tokStr = strtok($str, $token); while($tokStr !== false) { $tokenizedStrArr[] = $tokStr; $tokStr = strtok($token); } return $tokenizedStrArr; } var_dump(tokenize('foobarbaz', 'baz'));
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
array(2) { [0]=> string(3) "foo" [1]=> string(1) "r" }
Output for hhvm-3.10.0

Process exited with code 153.