3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function dotest($s) { $a = explode( ' ', $s, 2); var_dump($a); @list($x,$y) = explode( ' ', $s, 2); echo "'$y'"; echo "> '$x' , '$y' \n"; } dotest('test'); dotest('test and'); dotest('test and last');
Output for 4.3.0 - 7.2.0
array(1) { [0]=> string(4) "test" } ''> 'test' , '' array(2) { [0]=> string(4) "test" [1]=> string(3) "and" } 'and'> 'test' , 'and' array(2) { [0]=> string(4) "test" [1]=> string(8) "and last" } 'and last'> 'test' , 'and last'