3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $ar= array(); function ad($a=''){ global $ar; if(is_int($a)){ $ar[] = $a.'int'; }else{ $ar[] = $a.'not'; } } ad(); ad(2); ad('2'); ad(2.5); ad(0); ad(1); print_r($ar);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => not [1] => 2int [2] => 2not [3] => 2.5not [4] => 0int [5] => 1int )