3v4l.org

run code in 300+ PHP versions simultaneously
<?php $regex = "~%(?:(\d+)[$])?[-+]?(?:[ 0]|['].)?(?:[-]?\d+)?(?:[.]\d+)?[%bcdeEufFgGosxX]~"; $format = 'The %s contains %d monkeys'; $arguments = array(5, 'tree'); if (preg_match_all($regex, $format, $expected) > 0) { print_r(max($expected[1])); }

preferences:
49.56 ms | 402 KiB | 5 Q