diff options
author | Nuno Lopes <nlopess@php.net> | 2006-07-03 13:04:45 +0000 |
---|---|---|
committer | Nuno Lopes <nlopess@php.net> | 2006-07-03 13:04:45 +0000 |
commit | 9990b3f43162a53a9e3bce2a469cc7c4a14dff33 (patch) | |
tree | cfa4a3f33d4b9fbb8de26b3327436ca6fca28476 /ext/pcre/tests/match_flags3.phpt | |
parent | 1b2cc459c695706387c29f568f611c2c134f88e5 (diff) | |
download | php-git-9990b3f43162a53a9e3bce2a469cc7c4a14dff33.tar.gz |
new tests and fix the locales test where the pt local isnt available.
Diffstat (limited to 'ext/pcre/tests/match_flags3.phpt')
-rw-r--r-- | ext/pcre/tests/match_flags3.phpt | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/ext/pcre/tests/match_flags3.phpt b/ext/pcre/tests/match_flags3.phpt new file mode 100644 index 0000000000..8670f0383d --- /dev/null +++ b/ext/pcre/tests/match_flags3.phpt @@ -0,0 +1,37 @@ +--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_all('/\d+/', '123 456 789 012', $match, 0, -8)); +var_dump($match); + +var_dump(preg_match('/(?P<3>)/', '')); + +?> +--EXPECTF-- +Warning: Wrong value for parameter 4 in call to preg_match() in %smatch_flags3.php on line 3 +NULL +int(1) +array(1) { + [0]=> + string(3) "789" +} +int(2) +array(1) { + [0]=> + array(2) { + [0]=> + string(3) "789" + [1]=> + string(3) "012" + } +} + +Warning: preg_match: numeric named subpatterns are not allowed in %smatch_flags3.php on line 11 +bool(false) |