3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $data = "edvdr1 accepting requests since Tue Nov 19 16:22:32 2013"; $bits = explode(" ", $data); $useful = array_merge(array_slice($bits, 0, 2), array_slice($bits, 4)); var_dump($useful);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(7) { [0]=> string(6) "edvdr1" [1]=> string(9) "accepting" [2]=> string(3) "Tue" [3]=> string(3) "Nov" [4]=> string(2) "19" [5]=> string(8) "16:22:32" [6]=> string(4) "2013" }