3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $test = preg_split("[]", "['hotels'][3]"); echo var_dump($test);
Output for 4.3.0 - 7.2.0
array(15) { [0]=> string(0) "" [1]=> string(1) "[" [2]=> string(1) "'" [3]=> string(1) "h" [4]=> string(1) "o" [5]=> string(1) "t" [6]=> string(1) "e" [7]=> string(1) "l" [8]=> string(1) "s" [9]=> string(1) "'" [10]=> string(1) "]" [11]=> string(1) "[" [12]=> string(1) "3" [13]=> string(1) "]" [14]=> string(0) "" }