summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/bug75539.phpt
blob: 044e8fa718c4e818975548d75658ae5a9e2b9a1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
--TEST--
Bug #75539 - Recursive call errors are not reported by preg_last_error()
--FILE--
<?php

var_dump(preg_match('/((?1)?z)/', ''));
var_dump(preg_last_error() === \PREG_INTERNAL_ERROR);

?>
--EXPECTF--
Warning: preg_match(): Compilation failed: recursive call could loop indefinitely at offset %s in %s on line %s
bool(false)
bool(true)