Home
last modified time | relevance | path

Searched refs:preg_grep (Results 1 – 13 of 13) sorted by relevance

/PHP-5.5/ext/pcre/tests/
H A Dpreg_grep_error.phpt2 Test preg_grep() function : error conditions - wrong numbers of parameters
6 * proto array preg_grep(string regex, array input [, int flags])
9 echo "*** Testing preg_grep() : error conditions ***\n";
11 echo "\n-- Testing preg_grep() function with Zero arguments --\n";
12 var_dump(preg_grep());
13 //Test preg_grep with one more than the expected number of arguments
19 var_dump(preg_grep($regex, $input, $flags, $extra_arg));
20 // Testing preg_grep withone less than the expected number of arguments
23 var_dump(preg_grep($regex));
27 *** Testing preg_grep() : error conditions ***
[all …]
H A Dgrep2.phpt2 preg_grep() 2nd test
6 var_dump(preg_grep(1,array(),3,4));
7 var_dump(preg_grep(1, 2));
8 var_dump(preg_grep('/+/', array()));
12 var_dump(preg_grep('@^[a-z]+@', $array));
13 var_dump(preg_grep('@^[a-z]+@', $array, PREG_GREP_INVERT));
17 var_dump(preg_grep('@^[a-z]+@', $array));
22 Warning: preg_grep() expects at most 3 parameters, 4 given in %sgrep2.php on line 3
25 Warning: preg_grep() expects parameter 2 to be array, integer given in %sgrep2.php on line 4
28 Warning: preg_grep(): Compilation failed: nothing to repeat at offset 0 in %sgrep2.php on line 5
H A Dpreg_grep_error1.phpt2 Test preg_grep() function : error conditions - bad regular expressions
6 * proto array preg_grep(string regex, array input [, int flags])
11 * Testing how preg_grep reacts to being passed bad regexes
13 echo "*** Testing preg_grep() : error conditions ***\n";
23 var_dump(preg_grep($value, $array));
26 var_dump(preg_grep($value, $array));
31 *** Testing preg_grep() : error conditions ***
40 Warning: preg_grep(): No ending delimiter '/' found in %spreg_grep_error1.php on line %d
45 Warning: preg_grep(): Unknown modifier '/' in %spreg_grep_error1.php on line %d
50 Warning: preg_grep(): Unknown modifier 'F' in %spreg_grep_error1.php on line %d
[all …]
H A Dpreg_grep_error2.phpt2 Test preg_grep() function : error conditions - wrong arg types
6 * proto array preg_grep(string regex, array input [, int flags])
11 * Testing how preg_grep reacts to being passed the wrong type of input argument
13 echo "*** Testing preg_grep() : error conditions ***\n";
18 var_dump(preg_grep($regex, $value));
21 var_dump(preg_grep($regex, $value));
25 *** Testing preg_grep() : error conditions ***
29 Warning: preg_grep() expects parameter 2 to be array, string given in %spreg_grep_error2.php on lin…
40 Warning: preg_grep() expects parameter 2 to be array, object given in %spreg_grep_error2.php on lin…
H A Dgrep.phpt2 preg_grep()
7 var_dump(preg_grep('/^(\d|.\d)$/', $array));
8 var_dump(preg_grep('/^(\d|.\d)$/', $array, PREG_GREP_INVERT));
H A Dpreg_grep_basic.phpt2 Test preg_grep() function : basic functionality
6 * proto array preg_grep(string regex, array input [, int flags])
11 var_dump(preg_grep('@^HTTP(.*?)\w{2,}$@i', $array)); //finds a string starting with http (regardles…
12 var_dump(preg_grep('@(/\w+\.*/*)+@', $array)); //finds / followed by one or more of a-z, A-Z and 0-…
13 var_dump(preg_grep('@^http://[^w]{3}.*$@i', $array)); //finds http:// (at the beginning of a string…
14 var_dump(preg_grep('@.*?\.co\.uk$@i', $array)); //finds any address ending in .co.uk (matches none)
15 var_dump(preg_grep('@^HTTP(.*?)\w{2,}$@i', $array, PREG_GREP_INVERT)); //same as first example but …
H A Dbug44191.phpt2 Bug #44191 (preg_grep messes up array index)
8 preg_grep('/asdf/', $array);
H A Dbug44925.phpt2 Bug #44925 (preg_grep() modifies input array)
12 var_dump(preg_grep('/do not match/',$array));
14 $a = preg_grep('/./',$array);
H A Dbug69864.phpt27 preg_grep('/foo' . $i . 'bar/', ['???foo' . $i . 'bar???']);
H A Dpreg_last_error_error.phpt2 Test preg_grep() function : error conditions - wrong numbers of parameters
/PHP-5.5/sapi/cli/tests/
H A D006.phpt123 Function [ <internal:pcre> function preg_grep ] {
/PHP-5.5/ext/pcre/
H A Dphp_pcre.c1774 static PHP_FUNCTION(preg_grep) in PHP_FUNCTION() argument
1969 PHP_FE(preg_grep, arginfo_preg_grep)
/PHP-5.5/
H A DNEWS6819 - Fixed bug #44925 (preg_grep() modifies input array). (Nuno)
6951 - Fixed bug #44191 (preg_grep messes up array index). (Felipe)

Completed in 119 milliseconds