Annotation of embedaddon/php/ext/pcre/tests/002.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: preg_* with bogus vals
3: --FILE--
4: <?php
5:
6: var_dump(preg_match());
7: var_dump(preg_match_all());
8: var_dump(preg_match_all('//', '', $dummy, 0xdead));
9:
10: var_dump(preg_quote());
11: var_dump(preg_quote(''));
12:
13: var_dump(preg_replace('/(.)/', '${1}${1', 'abc'));
14: var_dump(preg_replace('/.++\d*+[/', 'for ($', 'abc'));
15: var_dump(preg_replace('/(.)/e', 'for ($', 'abc'));
16:
17: ?>
18: --EXPECTF--
19:
20: Warning: preg_match() expects at least 2 parameters, 0 given in %s002.php on line 3
21: bool(false)
22:
23: Warning: preg_match_all() expects at least 3 parameters, 0 given in %s002.php on line 4
24: bool(false)
25:
26: Warning: preg_match_all(): Invalid flags specified in %s002.php on line 5
27: NULL
28:
29: Warning: preg_quote() expects at least 1 parameter, 0 given in %s002.php on line 7
30: NULL
31: string(0) ""
32: string(12) "a${1b${1c${1"
33:
34: Warning: preg_replace(): Compilation failed: missing terminating ] for character class at offset 8 in %s002.php on line 11
35: NULL
36:
37: Parse error: %s in %s002.php(12) : regexp code on line 1
38:
39: Fatal error: preg_replace(): Failed evaluating code:
40: for ($ in %s002.php on line 12
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>