3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = "/person/find/LAST_NAME/contains/kins/FIRST_NAME/contains/j/ONLINEONLY/contains/0"; $t = explode('/',$s); $v = array_filter($t) ; var_dump($t); var_dump($v);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(12) { [0]=> string(0) "" [1]=> string(6) "person" [2]=> string(4) "find" [3]=> string(9) "LAST_NAME" [4]=> string(8) "contains" [5]=> string(4) "kins" [6]=> string(10) "FIRST_NAME" [7]=> string(8) "contains" [8]=> string(1) "j" [9]=> string(10) "ONLINEONLY" [10]=> string(8) "contains" [11]=> string(1) "0" } array(10) { [1]=> string(6) "person" [2]=> string(4) "find" [3]=> string(9) "LAST_NAME" [4]=> string(8) "contains" [5]=> string(4) "kins" [6]=> string(10) "FIRST_NAME" [7]=> string(8) "contains" [8]=> string(1) "j" [9]=> string(10) "ONLINEONLY" [10]=> string(8) "contains" }