3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $text = "this is a long test"; $arr = str_split($text); var_dump($arr);
based on ljlTK
Output for 5.0.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
array(19) { [0]=> string(1) "t" [1]=> string(1) "h" [2]=> string(1) "i" [3]=> string(1) "s" [4]=> string(1) " " [5]=> string(1) "i" [6]=> string(1) "s" [7]=> string(1) " " [8]=> string(1) "a" [9]=> string(1) " " [10]=> string(1) "l" [11]=> string(1) "o" [12]=> string(1) "n" [13]=> string(1) "g" [14]=> string(1) " " [15]=> string(1) "t" [16]=> string(1) "e" [17]=> string(1) "s" [18]=> string(1) "t" }
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: str_split() in /in/Oqhco on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: str_split() in /in/Oqhco on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: str_split() in /in/Oqhco on line 5