xref: /PHP-7.0/ext/pcre/tests/bug75539.phpt (revision 8fdef981)
1--TEST--
2Bug #75539 - Recursive call errors are not reported by preg_last_error()
3--FILE--
4<?php
5
6var_dump(preg_match('/((?1)?z)/', ''));
7var_dump(preg_last_error() === \PREG_INTERNAL_ERROR);
8
9?>
10--EXPECTF--
11Warning: preg_match(): Compilation failed: recursive call could loop indefinitely at offset %s in %s on line %s
12bool(false)
13bool(true)