3v4l.org

run code in 200+ PHP versions simultaneously
<?php $string = "Hello! 123 test this? 456. done? 100%"; $int = intval(preg_replace('/[^0-9]+/', '', $string), 10); echo $int;
based on bQLDI
Output for 4.3.0 - 7.4.0
123456100