3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php intval('42', 8); // => 34 intval(42, 8); // => 42 ! ?> PHP considers the 42 as being already an integer, and doesn't apply any conversion. And supplying <?php intval(49, 8); // => 49 ! ?>
Output for 4.3.0 - 7.1.0
PHP considers the 42 as being already an integer, and doesn't apply any conversion. And supplying