3v4l.org

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

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
155.86 ms | 3274 KiB | 10 Q