3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump( explode( ' ', 'test', 2) ); var_dump( explode( ' ', 'test set', 2) ); var_dump( explode( ' ', 'test set last', 2) );
Output for 4.3.0 - 7.1.0
array(1) { [0]=> string(4) "test" } array(2) { [0]=> string(4) "test" [1]=> string(3) "set" } array(2) { [0]=> string(4) "test" [1]=> string(8) "set last" }