<?php $regex = ' (?<types> (?: (?:\{ (?&types) \}) | (a) ) (\*?) ) '; ini_set('pcre.jit', '0'); $res = preg_match('{^' . $regex . '$}x', '{a}', $matches); ini_set('pcre.jit', '1'); // regex must be different to prevent regex cache, so just add 2nd "x" modifier $res2 = preg_match('{^' . $regex . '$}xx', '{a}', $matches2); var_dump($matches === $matches2); echo 'without JIT:' . "\n"; print_r($matches); echo "\n"; echo 'with JIT:' . "\n"; print_r($matches2);
You have javascript disabled. You will not be able to edit any code.