mirror of
https://github.com/php/php-src.git
synced 2024-10-05 08:46:11 +00:00
46 lines
778 B
PHP
46 lines
778 B
PHP
--TEST--
|
|
preg_match() flags 3
|
|
--FILE--
|
|
<?php
|
|
|
|
var_dump(preg_match('', '', $match, 0xfff));
|
|
|
|
var_dump(preg_match('/\d+/', '123 456 789 012', $match, 0, -8));
|
|
var_dump($match);
|
|
|
|
var_dump(preg_match('/\d+/', '123 456 789 012', $match, 0, -500));
|
|
var_dump($match);
|
|
|
|
var_dump(preg_match_all('/\d+/', '123 456 789 012', $match, 0, -8));
|
|
var_dump($match);
|
|
|
|
var_dump(preg_match('/(?P<3>)/', ''));
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Warning: preg_match(): Empty regular expression in %s on line %d
|
|
bool(false)
|
|
int(1)
|
|
array(1) {
|
|
[0]=>
|
|
unicode(3) "789"
|
|
}
|
|
int(1)
|
|
array(1) {
|
|
[0]=>
|
|
unicode(3) "123"
|
|
}
|
|
int(2)
|
|
array(1) {
|
|
[0]=>
|
|
array(2) {
|
|
[0]=>
|
|
unicode(3) "789"
|
|
[1]=>
|
|
unicode(3) "012"
|
|
}
|
|
}
|
|
|
|
Warning: preg_match(): Numeric named subpatterns are not allowed in %s on line %d
|
|
bool(false)
|