3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "Hello! 123 test this? 456. done? 100%"; $int = filter_var($string, FILTER_SANITIZE_NUMBER_INT); echo $int;

preferences:
54.33 ms | 402 KiB | 5 Q