3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $in = array( "Hello", "Hello | world", "Hello | My | Lovely | World" ); foreach($in as $test){ list($one,$two) = explode(" | ", $test, 2); print_r(array($one, $two)); }
Output for 5.3.0 - 7.1.0
Notice: Undefined offset: 1 in /in/Uqdh8 on line 10 Array ( [0] => Hello [1] => ) Array ( [0] => Hello [1] => world ) Array ( [0] => Hello [1] => My | Lovely | World )
Output for 4.3.0 - 5.2.17
Notice: Undefined offset: 1 in /in/Uqdh8 on line 10 Array ( [0] => Hello [1] => ) Array ( [0] => Hello [1] => world ) Array ( [0] => Hello [1] => My | Lovely | World )