3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $s = "1+hello/world"; $e = explode("/", $s); $f = strpos($s, "af+"); $pattern = '/[\+-\/]/'; $r = preg_split($pattern, $s, -1, PREG_SPLIT_DELIM_CAPTURE); var_dump($r);
Output for 4.3.0 - 7.1.0
array(3) { [0]=> string(1) "1" [1]=> string(5) "hello" [2]=> string(5) "world" }