1--TEST--
2preg_replace_callback() 3
3--FILE--
4<?php
5
6var_dump(preg_replace_callback());
7var_dump(preg_replace_callback(1));
8var_dump(preg_replace_callback(1,2));
9var_dump(preg_replace_callback(1,2,3));
10var_dump(preg_replace_callback(1,2,3,4));
11$a = 5;
12var_dump(preg_replace_callback(1,2,3,4,$a));
13$a = "";
14var_dump(preg_replace_callback("","","","",$a));
15$a = array();
16var_dump(preg_replace_callback($a,$a,$a,$a,$a));
17
18echo "Done\n";
19?>
20--EXPECTF--
21Warning: preg_replace_callback() expects at least 3 parameters, 0 given in %s on line %d
22NULL
23
24Warning: preg_replace_callback() expects at least 3 parameters, 1 given in %s on line %d
25NULL
26
27Warning: preg_replace_callback() expects at least 3 parameters, 2 given in %s on line %d
28NULL
29
30Warning: preg_replace_callback(): Requires argument 2, '2', to be a valid callback in %s on line %d
31int(3)
32
33Warning: preg_replace_callback(): Requires argument 2, '2', to be a valid callback in %s on line %d
34int(3)
35
36Warning: preg_replace_callback(): Requires argument 2, '2', to be a valid callback in %s on line %d
37int(3)
38
39Warning: preg_replace_callback() expects parameter 4 to be long, string given in %s on line %d
40NULL
41
42Warning: preg_replace_callback() expects parameter 4 to be long, array given in %s on line %d
43NULL
44Done
45