1
0
mirror of https://github.com/php/php-src.git synced 2026-04-30 03:33:17 +02:00
Files
archived-php-src/ext/pcre/tests/bug78853.phpt
T
Christoph M. Becker e1da72bdf1 Fix #78853: preg_match() may return integer > 1
Commit 54ebebd[1] optimized the match loop, but for this case it has
been overlooked, that we must only loop if we're doing global matching.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=54ebebd686255c5f124af718c966edb392782d4a>
2019-11-22 19:26:26 +01:00

9 lines
137 B
PHP

--TEST--
Bug #78853 (preg_match() may return integer > 1)
--FILE--
<?php
var_dump(preg_match('/^|\d{1,2}$/', "7"));
?>
--EXPECT--
int(1)