3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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(intval(max($expected[1]))); }
Output for 4.3.0 - 7.2.0
0