3v4l.org

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