3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function mbStringToArray ($string) { $strlen = mb_strlen($string); while ($strlen) { $array[] = mb_substr($string,0,1,"UTF-8"); $string = mb_substr($string,1,$strlen,"UTF-8"); $strlen = mb_strlen($string); } return $array; } $a = "बिक्रम"; $lol = mbStringToArray($a); $test = json_decode('"\u093F"'); function overall (){ $hindi = array("\u093E","\u093F","\u0945","\u0946","\u0947","\u0948","\u0949","\u094A","\u094B","\u094C","\u094D"); for($i = 0; $i<count($hindi); $i++){ echo json_decode('"'.$hindi[$i].'"'); echo "<br/>" } } echo $test."---".$lol[1]; if($test == $lol[1]){ echo "Game"; } else echo "No game"; overall(); ?>
based on IqHPO
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.4.34
Parse error: syntax error, unexpected '}', expecting ',' or ';' in /in/gZBaq on line 21
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '}', expecting ',' or ';' in /in/gZBaq on line 21
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `','' or `';'' in /in/gZBaq on line 21
Process exited with code 255.