3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php try{ (gettype('a' + 0) == 'integer'); echo 'es integer'; } catch(Exception $e){ if($e === 'E_WARNING'){ echo 'es string'; } }
based on I5ni1
Output for 7.1.0 - 7.3.0beta1
Warning: A non-numeric value encountered in /in/tGFRF on line 3 es integer
Output for 5.6.0 - 5.6.30, hhvm-3.18.5 - 3.22.0, 7.0.0 - 7.0.25
es integer