3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump(intval('0777')); var_dump(intval('777')); var_dump(intval('0777', 0)); var_dump(intval('777', 0)); var_dump(intval('0777', 8)); var_dump(intval('777', 8)); var_dump(intval(0777, 8)); var_dump(intval(777, 8));
based on 3JUMc
Output for 4.3.0 - 7.2.6
int(777) int(777) int(511) int(777) int(511) int(511) int(511) int(777)