summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/bug75539.phpt
blob: 83f3ef7d6b728ae37292a6e5402d33690f9269c7 (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)