3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $searchLiterals = array("HALLO hallo Hallo","Hello asfddgf","h+o+la","H-OLA","sdf.adf","asfd+asdf-asdf.asdf asdf/dsf"); foreach($searchLiterals as $searchLiteral){ $split = split(" ", $searchLiteral); $preg = preg_split(" ", $searchLiteral); $str = str_split(" ", $searchLiteral); echo ($preg === $split)."\n"; echo $preg."\t".$split."\n"; }
based on nnilG
Output for 7.0.0 - 7.3.0
Fatal error: Uncaught Error: Call to undefined function split() in /in/7bpm7:7 Stack trace: #0 {main} thrown in /in/7bpm7 on line 7
Process exited with code 255.
Output for 5.4.0 - 5.6.38
Deprecated: Function split() is deprecated in /in/7bpm7 on line 7 Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Notice: Array to string conversion in /in/7bpm7 on line 11 Array Deprecated: Function split() is deprecated in /in/7bpm7 on line 7 Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Notice: Array to string conversion in /in/7bpm7 on line 11 Array Deprecated: Function split() is deprecated in /in/7bpm7 on line 7 Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Notice: Array to string conversion in /in/7bpm7 on line 11 Array Deprecated: Function split() is deprecated in /in/7bpm7 on line 7 Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Notice: Array to string conversion in /in/7bpm7 on line 11 Array Deprecated: Function split() is deprecated in /in/7bpm7 on line 7 Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Notice: Array to string conversion in /in/7bpm7 on line 11 Array Deprecated: Function split() is deprecated in /in/7bpm7 on line 7 Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Notice: Array to string conversion in /in/7bpm7 on line 11 Array
Output for 5.3.0 - 5.3.29
Deprecated: Function split() is deprecated in /in/7bpm7 on line 7 Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Array Deprecated: Function split() is deprecated in /in/7bpm7 on line 7 Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Array Deprecated: Function split() is deprecated in /in/7bpm7 on line 7 Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Array Deprecated: Function split() is deprecated in /in/7bpm7 on line 7 Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Array Deprecated: Function split() is deprecated in /in/7bpm7 on line 7 Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Array Deprecated: Function split() is deprecated in /in/7bpm7 on line 7 Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Array
Output for 5.0.0 - 5.2.17
Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Array Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Array Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Array Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Array Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Array Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Warning: str_split() expects parameter 2 to be long, string given in /in/7bpm7 on line 9 Array
Output for 4.4.5 - 4.4.9
Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Fatal error: Call to undefined function: str_split() in /in/7bpm7 on line 9
Process exited with code 255.
Output for 4.3.11 - 4.4.4
Warning: preg_split(): Empty regular expression in /in/7bpm7 on line 8 Fatal error: Call to undefined function: str_split() in /in/7bpm7 on line 9
Process exited with code 255.
Output for 4.3.2 - 4.3.10
Warning: Empty regular expression in /in/7bpm7 on line 8 Fatal error: Call to undefined function: str_split() in /in/7bpm7 on line 9
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: Empty regular expression in /in/7bpm7 on line 8 Fatal error: Call to undefined function: str_split() in /in/7bpm7 on line 9