3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $s = function_exists("str_split"); function dix() { global $s; $d = ($s ? str_split("dongs") : strlen("NEIGH")); var_dump($d); } dix();
based on Xifid
Output for 5.0.0 - 7.2.0
array(5) { [0]=> string(1) "d" [1]=> string(1) "o" [2]=> string(1) "n" [3]=> string(1) "g" [4]=> string(1) "s" }
Output for 4.3.0 - 4.4.9
int(5)