3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s1 = 'abc|def'; $s2 = 'abc|def|gh'; $s3 = 'abc|def|gh|ijk'; var_dump(explode($s1, '|', 3)); var_dump(explode($s2, '|', 3)); var_dump(explode($s3, '|', 3));
Output for 4.3.0 - 7.1.0
array(1) { [0]=> string(1) "|" } array(1) { [0]=> string(1) "|" } array(1) { [0]=> string(1) "|" }