3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = "123"; $ai = intval($a); var_dump(is_int($a)); var_dump(intval($a)); var_dump($a == $ai); $b = "123a"; var_dump(intval($b)); $bi = intval($b); var_dump($b == $bi);
Output for 4.3.0 - 7.1.0
bool(false) int(123) bool(true) int(123) bool(true)