Home
last modified time | relevance | path

Searched refs:preg_replace (Results 1 – 25 of 59) sorted by relevance

123

/PHP-5.5/ext/pcre/tests/
H A Dpreg_replace_error.phpt2 Test preg_replace() function : error - incorrect number of parameters
9 echo "*** Testing preg_replace() : error conditions ***\n";
11 echo "\n-- Testing preg_replace() function with zero arguments --\n";
12 var_dump(preg_replace());
13 //Test preg_replace() with one more than the expected number of arguments
20 var_dump(preg_replace($regex, $replace, $subject, $limit, $count, $extra_arg));
21 //Testing preg_replace() with one less than the expected number of arguments
25 var_dump(preg_replace($regex, $replace));
29 *** Testing preg_replace() : error conditions ***
31 -- Testing preg_replace() function with zero arguments --
[all …]
H A Dpreg_replace2.phpt2 preg_replace()
12 var_dump(preg_replace('', array(), ''));
14 var_dump(preg_replace(array('/\da(.)/ui', '@..@'), '$1', '12Abc'));
15 var_dump(preg_replace(array('/\da(.)/ui', '@(.)@'), '$1', array('x','a2aA', '1av2Ab')));
18 var_dump(preg_replace(array('/[\w]+/'), array('$'), array('xyz', 'bdbd')));
19 var_dump(preg_replace(array('/\s+/', '~[b-d]~'), array('$'), array('x y', 'bd bc')));
25 Warning: preg_replace(): Parameter mismatch, pattern is a string while replacement is an array in %…
H A Dpreg_replace_error1.phpt2 Test preg_replace() function : error - bad regular expressions
6 * proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]])
11 * Testing how preg_replace reacts to being passed the wrong type of regex argument
13 echo "*** Testing preg_replace() : error conditions***\n";
24 var_dump(preg_replace($regex_value, $replace, $subject));
27 var_dump(preg_replace($regex_value, $replace, $subject));
30 *** Testing preg_replace() : error conditions***
34 Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in %spreg_replace_error1.p…
39 Warning: preg_replace(): No ending delimiter '/' found in %spreg_replace_error1.php on line %d
44 Warning: preg_replace(): Unknown modifier '/' in %spreg_replace_error1.php on line %d
[all …]
H A Dbug66121.phpt6 var_dump(preg_replace('/(?<!ක)/u', '*', 'ක'));
7 var_dump(preg_replace('/(?<!ක)/u', '*', 'ම'));
9 var_dump(preg_replace('/(?<!k)/u', '*', 'k'));
10 var_dump(preg_replace('/(?<!k)/u', '*', 'm'));
15 var_dump(preg_replace('/(?<!ක)/u', '*', "\xFCක"));
16 var_dump(preg_replace('/(?<!ක)/u', '*', "ක\xFC"));
H A Dpreg_replace_error2.phpt2 Test preg_replace() function : error conditions - wrong arg types
6 * proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]])
11 * Testing how preg_replace reacts to being passed the wrong type of replacement argument
13 echo "*** Testing preg_replace() : error conditions ***\n";
19 var_dump(preg_replace($regex, $value, $subject));
22 var_dump(preg_replace($regex, $value, $subject));
26 *** Testing preg_replace() : error conditions ***
33 Warning: preg_replace(): Parameter mismatch, pattern is a string while replacement is an array in %…
H A Dbug53823.phpt2 Bug #53823 - preg_replace: * qualifier on unicode replace garbles the string
5 var_dump(preg_replace('/[^\pL\pM]*/iu', '', 'áéíóú'));
7 var_dump(preg_replace('/[^\pL\pM]*/iu', '', "\xFCáéíóú"));
8 var_dump(preg_replace('/[^\pL\pM]*/iu', '', "áéíóú\xFC"));
H A D002.phpt13 var_dump(preg_replace('/(.)/', '${1}${1', 'abc'));
14 var_dump(preg_replace('/.++\d*+[/', 'for ($', 'abc'));
15 var_dump(preg_replace('/(.)/e', 'for ($', 'abc'));
34 Warning: preg_replace(): Compilation failed: missing terminating ] for character class at offset 8 …
37 Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in %s …
41 Fatal error: preg_replace(): Failed evaluating code:
H A Dpreg_replace.phpt2 preg_replace()
6 var_dump(preg_replace('{{\D+}}', 'x', '{abcd}'));
7 var_dump(preg_replace('{{\D+}}', 'ddd', 'abcd'));
9 var_dump(preg_replace('/(ab)(c)(d)(e)(f)(g)(h)(i)(j)(k)/', 'a${1}2$103', 'zabcdefghijkl'));
H A Dpcre_count.phpt2 preg_replace() fifth parameter - count
9 var_dump(preg_replace($regex, 'xxxx', $string, -1, $count));
16 var_dump(preg_replace($regex, 'xxxx', $string, -1, $count));
23 var_dump(preg_replace($regex, '...', $string, -1, $count));
29 var_dump(preg_replace($regex, '...', $string, -1));
H A Dpreg_replace_variation1.phpt2 Test preg_replace() function : variation both arguments are arrays
6 * proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]])
10 * Testing preg_replace when the regex and the replacement are both arrays.
13 $new_string = preg_replace(array('/\b\w{1}s/', '/(\d{1})-(\d{1})/', '/[\(!\)]/'), array('test', '$1…
H A Dpreg_replace_basic.phpt2 Test preg_replace() function : basic functionality
6 * proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, count]])
11 var_dump(preg_replace('<- This is a string$>', 'This shouldn\'t work', $string)); //tries to find '…
12 var_dump(preg_replace('<[0-35-9]>', '4', $string)); //finds any number that's not 4 and replaces it…
13 var_dump(preg_replace('<\b[hH]\w{2,4}>', 'Bonjour', $string)); //finds h or H at the beginning of a…
14 var_dump(preg_replace('<(\w)\s*-\s*(\w)>', '\\1. \\2', $string)); //finds dashes with an indefinite…
15 var_dump(preg_replace('<(^[a-z]\w+)@(\w+)\.(\w+)\.([a-z]{2,}$)>', '\\1 at \\2 dot \\3 dot \\4', 'jo…
H A Dpreg_replace_edit_basic.phpt2 Test preg_replace() function : basic
5 /* Prototype : proto string preg_replace(mixed regex, mixed replace, mixed subject [, int limit [,…
14 var_dump(preg_replace('<- This is a string$>',
17 var_dump(preg_replace('<[0-35-9]>',
23 var_dump(preg_replace('<\b[hH]\w{2,4}>',
26 var_dump(preg_replace('<(\w)\s*-\s*(\w)>',
29 var_dump(preg_replace('<(^[a-z]\w+)@(\w+)\.(\w+)\.([a-z]{2,}$)>',
H A D006.phpt2 preg_replace() with array of failing regular expressions
9 $result = preg_replace(array('#\[(right)\](((?R)|[^[]+?|\[)*)\[/\\1\]#siU', '#\[(right)\](((?R)|[^[…
13 $result = preg_replace('#\[(right)\](((?R)|[^[]+?|\[)*)\[/\\1\]#siU', '', $text);
H A Dbug37800.phpt2 Bug #37800 (preg_replace() limit parameter odd behaviour)
11 $s_output = preg_replace($s_search, $s_replace, $s_string, $i_limit,
18 $s_output = preg_replace($s_search, $s_replace, $s_string, $i_limit,
H A Dbug21758.phpt8 $s = 'preg_replace() is broken';
26 string(25) "preg_replace() is working"
H A Dinvalid_utf8.phpt2 preg_replace() and invalid UTF8
13 $result = preg_replace("#(&\#x*)([0-9A-F]+);*#iu","$1$2;",$string);
H A Dbug21732.phpt2 Bug #21732 (preg_replace() segfaults with invalid parameters)
14 var_dump(preg_replace('', array(), ''));
H A Dbug41148.phpt43 $letexte = preg_replace($cherche1, $remplace1, $letexte);
44 $letexte = preg_replace("@^ <br />@S", "", $letexte);
H A D004.phpt15 var_dump(preg_replace(array('@//.*@S', '@/\*.*\*/@SsUe'), array('', 'preg_replace("/[^\r\n]+/S", ""…
121 Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in %s …
H A Dnull_bytes.phpt18 preg_replace("/foo/e\0/i", "echo('Eek');", "");
42 Warning: preg_replace(): Null byte in regex in %snull_bytes.php on line 15
/PHP-5.5/tests/lang/
H A Dbug24403.phpt11 $output = preg_replace(
21 Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in %s …
/PHP-5.5/ext/opcache/tests/
H A Dblacklist.phpt15 $conf[3] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[3]);
16 $conf[4] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[4]);
H A Dblacklist-win32.phpt15 $conf[3] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[3]);
16 $conf[4] = preg_replace("!^\\Q".dirname(__FILE__)."\\E!", "__DIR__", $conf[4]);
/PHP-5.5/ext/curl/tests/
H A Dcurl_setopt_basic002.phpt30 var_dump(preg_replace('/[\r\n]/', ' ', file_get_contents($temp_file)));
42 var_dump(preg_replace('/[\r\n]/', ' ', file_get_contents($temp_file)));
/PHP-5.5/
H A Dserver-tests.php1256 @unlink(preg_replace('/\.phpt$/','.diff',$file));
1257 @unlink(preg_replace('/\.phpt$/','.log',$file));
1258 @unlink(preg_replace('/\.phpt$/','.exp',$file));
1259 @unlink(preg_replace('/\.phpt$/','.out',$file));
1416 $output = preg_replace('/\r\n/',"\n",$output);
1426 $wanted_re = preg_replace('/\r\n/',"\n",$wanted);
1529 $wanted = preg_replace('/\r\n/',"\n",$wanted);
1554 $logname = preg_replace('/\.phpt$/','.exp',$file);
1560 $logname = preg_replace('/\.phpt$/','.out',$file);
1566 $logname = preg_replace('/\.phpt$/','.diff',$file);
[all …]

Completed in 55 milliseconds

123