Home
last modified time | relevance | path

Searched refs:callback (Results 1 – 25 of 365) sorted by relevance

12345678910>>...15

/PHP-7.3/ext/session/tests/
H A Dsession_set_save_handler_error4.phpt11 …bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, ca…
18 function callback() { return true; }
20 session_set_save_handler("callback", "callback", "callback", "callback", "callback", "callback");
21 session_set_save_handler("callback", "echo", "callback", "callback", "callback", "callback");
22 session_set_save_handler("callback", "callback", "echo", "callback", "callback", "callback");
23 session_set_save_handler("callback", "callback", "callback", "echo", "callback", "callback");
24 session_set_save_handler("callback", "callback", "callback", "callback", "echo", "callback");
25 session_set_save_handler("callback", "callback", "callback", "callback", "callback", "echo");
26 session_set_save_handler("callback", "callback", "callback", "callback", "callback", "callback");
33 Warning: session_set_save_handler(): Argument 2 is not a valid callback in %s on line %d
[all …]
H A Dsession_set_save_handler_error.phpt11 …bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, ca…
100 Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
105 Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
110 Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
115 Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
120 Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
125 Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
130 Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
135 Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
140 Warning: session_set_save_handler(): Argument 1 is not a valid callback in %s on line %d
[all …]
/PHP-7.3/Zend/tests/
H A Dindirect_call_string_002.phpt15 $callback();
19 $callback();
24 $callback();
32 $callback();
40 $callback();
46 $callback = '::';
48 $callback();
56 $callback();
64 $callback();
70 $callback = ':';
[all …]
H A Dbug68475.phpt19 $callback = 'TestClass::staticMethod';
20 $callback();
23 $callback = 'testclass::staticmethod';
24 $callback();
27 $callback = 'TestClass::staticMethodWithArgs';
30 $callback($args[0], $args[1], $args[2]);
33 $callback(...$args);
36 $callback = 'TestClass::undefinedMethod';
38 $callback();
44 $callback = 'UndefinedClass::testMethod';
[all …]
H A Dindirect_call_string_001.phpt24 $callback = 'TestNamespace\TestClass::staticMethod';
25 $callback();
28 $callback = 'testnamespace\testclass::staticmethod';
29 $callback();
32 $callback = 'TestNamespace\TestClass::staticMethodWithArgs';
35 $callback($args[0], $args[1], $args[2]);
38 $callback(...$args);
/PHP-7.3/ext/standard/tests/array/
H A Darray_filter_variation7.phpt5 /* Prototype : array array_filter(array $input [, callback $callback])
6 * Description: Filters elements from the array via the callback.
18 // anonymous callback function
22 // anonymous callback function with reference
23 echo "Anonymous callback function with reference parameter\n";
26 // anonymous callback function with null argument
27 echo "Anonymous callback funciton with null argument\n";
30 // anonymous callback function with argument and null statement
38 Anonymous callback function with regular parameter and statement
47 Anonymous callback function with reference parameter
[all …]
H A Darray_filter_variation8.phpt5 /* Prototype : array array_filter(array $input [, callback $callback])
19 // callback functions
25 echo "callback function with int return value\n";
33 echo "callback function with float return value\n";
41 echo "callback function with string return value\n";
49 echo "callback function with null return value\n";
64 callback function with int return value
85 callback function with float return value
106 callback function with string return value
127 callback function with null return value
[all …]
H A Darray_filter_variation9.phpt2 Test array_filter() function : usage variations - built-in functions as 'callback' argument
5 /* Prototype : array array_filter(array $input [, callback $callback])
6 * Description: Filters elements from the array via the callback.
11 * Passing built-in functions and different language constructs as 'callback' argument
14 echo "*** Testing array_filter() : usage variations - built-in functions as 'callback' argument ***…
18 // using built-in function 'is_int' as 'callback'
21 // using built-in function 'chr' as 'callback'
24 // using language construct 'echo' as 'callback'
27 // using language construct 'exit' as 'callback'
33 *** Testing array_filter() : usage variations - built-in functions as 'callback' argument ***
[all …]
H A Darray_map_variation11.phpt2 Test array_map() function : usage variations - with recursive callback
5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
11 * Test array_map() by passing subarrays and recursive callback function
14 echo "*** Testing array_map() : recursive callback function ***\n";
16 // callback function
30 *** Testing array_map() : recursive callback function ***
H A Darray_map_variation19.phpt2 Test array_map() function : usage variations - callback pass semantics
5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
11 * Test array_map() with a pass-by-value callback forced to behave as a pass-by-reference function.
17 function callback($a) {
21 array_map('callback', $arr1);
25 array_map("callback", $arr2);
H A Darray_map_variation17.phpt2 Test array_map() function : usage variations - unexpected values for 'callback' argument
5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
11 * Test array_map() by passing different scalar/nonscalar values in place of $callback
14 echo "*** Testing array_map() : unexpected values for 'callback' argument ***\n";
77 *** Testing array_map() : unexpected values for 'callback' argument ***
80 Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on …
84 Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on …
88 Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on …
92 Warning: array_map() expects parameter 1 to be a valid callback, no array or string given in %s on …
[all …]
H A Darray_filter_variation2.phpt2 Test array_filter() function : usage variations - Unexpected values for 'callback' function argument
5 /* Prototype : array array_filter(array $input [, callback $callback])
6 * Description: Filters elements from the array via the callback.
10 /* Passing different scalar and nonscalar values in place of 'callback' argument
12 echo "*** Testing array_filter() : usage variations - unexpected values for 'callback' function***\…
33 // different scalar and nonscalar values in place of callback function
87 // loop through each element of the 'values' for callback
99 *** Testing array_filter() : usage variations - unexpected values for 'callback' function***
101 Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s …
104 Warning: array_filter() expects parameter 2 to be a valid callback, no array or string given in %s …
[all …]
H A Darray_map_variation15.phpt2 Test array_map() function : usage variations - non existent 'callback' function
5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
11 * Test array_map() by passing non existent function for $callback argument
14 echo "*** Testing array_map() : non existent 'callback' function ***\n";
26 *** Testing array_map() : non existent 'callback' function ***
28 Warning: array_map() expects parameter 1 to be a valid callback, function 'non_existent' not found …
H A Darray_intersect_ukey_variation3.phpt2 Test array_intersect_ukey() function : usage variation - Passing unexpected values to callback argu…
5 /* Prototype : array array_intersect_ukey(array arr1, array arr2 [, array ...], callback key_compa…
6 …* Description: Computes the intersection of arrays using a callback function on the keys for compa…
101 Warning: array_intersect_ukey() expects parameter 3 to be a valid callback, no array or string give…
104 Warning: array_intersect_ukey() expects parameter 4 to be a valid callback, no array or string give…
109 Warning: array_intersect_ukey() expects parameter 3 to be a valid callback, no array or string give…
112 Warning: array_intersect_ukey() expects parameter 4 to be a valid callback, no array or string give…
117 Warning: array_intersect_ukey() expects parameter 3 to be a valid callback, no array or string give…
120 Warning: array_intersect_ukey() expects parameter 4 to be a valid callback, no array or string give…
125 Warning: array_intersect_ukey() expects parameter 3 to be a valid callback, no array or string give…
[all …]
H A Darray_walk_recursive_variation2.phpt33 // different scalar/nonscalar values to be used in place of callback function
95 Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string give…
98 Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string give…
102 Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string give…
105 Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string give…
109 Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string give…
112 Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string give…
116 Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string give…
119 Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string give…
123 Warning: array_walk_recursive() expects parameter 2 to be a valid callback, no array or string give…
[all …]
H A Darray_walk_variation2.phpt33 // different scalar/nonscalar values to be used in place of callback function
95 Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on…
98 Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on…
102 Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on…
105 Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on…
109 Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on…
112 Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on…
116 Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on…
119 Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on…
123 Warning: array_walk() expects parameter 2 to be a valid callback, no array or string given in %s on…
[all …]
H A Darray_map_variation7.phpt5 /* Prototype : array array_map ( callback $callback , array $arr1 [, array $... ] )
6 * Description: Applies the callback to the elements of the given arrays
16 * 5) one more array than callback function arguments
21 function callback($a, $b)
27 var_dump( array_map('callback', array(1, 2, 3), array()) );
28 var_dump( array_map('callback', array(), array('a', 'b', 'c')) );
29 var_dump( array_map('callback', array(1, 2, 3), array('a', 'b')) );
30 var_dump( array_map('callback', array(012, 0x2F, 0X1A), array(2.3, 12.4e2)) );
31 var_dump( array_map('callback', array(), array(1, 2, 3), array('a', 'b')) ); // passing more no. o…
H A Darray_diff_ukey_variation4.phpt2 Test array_diff_ukey() function : usage variation - Passing unexpected values to callback argument
5 /* Prototype : array array_diff_ukey(array arr1, array arr2 [, array ...], callback key_comp_func)
97 Warning: array_diff_ukey() expects parameter 3 to be a valid callback, no array or string given in …
100 Warning: array_diff_ukey() expects parameter 4 to be a valid callback, no array or string given in …
105 Warning: array_diff_ukey() expects parameter 3 to be a valid callback, no array or string given in …
108 Warning: array_diff_ukey() expects parameter 4 to be a valid callback, no array or string given in …
113 Warning: array_diff_ukey() expects parameter 3 to be a valid callback, no array or string given in …
116 Warning: array_diff_ukey() expects parameter 4 to be a valid callback, no array or string given in …
121 Warning: array_diff_ukey() expects parameter 3 to be a valid callback, no array or string given in …
124 Warning: array_diff_ukey() expects parameter 4 to be a valid callback, no array or string given in …
[all …]
H A Darray_intersect_uassoc_variation4.phpt5 /* Prototype : array array_intersect_uassoc(array arr1, array arr2 [, array ...], callback key_com…
6 …tes the intersection of arrays with additional index check, compares indexes by a callback function
100 Warning: array_intersect_uassoc() expects parameter 3 to be a valid callback, no array or string gi…
103 Warning: array_intersect_uassoc() expects parameter 4 to be a valid callback, no array or string gi…
108 Warning: array_intersect_uassoc() expects parameter 3 to be a valid callback, no array or string gi…
111 Warning: array_intersect_uassoc() expects parameter 4 to be a valid callback, no array or string gi…
116 Warning: array_intersect_uassoc() expects parameter 3 to be a valid callback, no array or string gi…
119 Warning: array_intersect_uassoc() expects parameter 4 to be a valid callback, no array or string gi…
124 Warning: array_intersect_uassoc() expects parameter 3 to be a valid callback, no array or string gi…
127 Warning: array_intersect_uassoc() expects parameter 4 to be a valid callback, no array or string gi…
[all …]
H A Darray_filter_variation5.phpt5 /* Prototype : array array_filter(array $input [, callback $callback])
6 * Description: Filters elements from the array via the callback.
11 * With default callback function argument, array_filter() removes elements which are interpreted as…
15 // callback function always_true
21 // callback function always_false
57 // With default callback function
60 // With callback function which returns always true
63 // With callback function which returns always false
H A Dusort_variation2.phpt105 Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line…
110 Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line…
115 Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line…
120 Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line…
125 Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line…
130 Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line…
135 Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line…
140 Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line…
145 Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line…
175 Warning: usort() expects parameter 2 to be a valid callback, no array or string given in %s on line…
[all …]
H A Darray_filter_variation4.phpt2 Test array_filter() function : usage variations - Different types of 'callback' function
5 /* Prototype : array array_filter(array $input [, callback $callback])
6 * Description: Filters elements from the array via the callback.
11 * Passing different types of callback functions to array_filter()
18 echo "*** Testing array_filter() : usage variation - different 'callback' functions***\n";
23 // callback function without parameters and with return value
31 // callback function with parameter and without return value
39 // callback function without parameter and without return value
46 // callback function with parameter and with return value
62 *** Testing array_filter() : usage variation - different 'callback' functions***
/PHP-7.3/tests/output/
H A Dob_start_basic_002.phpt2 ob_start(): Check behaviour with various callback return values.
25 // Use each of the above functions as an output buffering callback:
29 foreach ($callbacks as $callback) {
30 echo "--> Use callback '$callback':\n";
31 ob_start($callback);
40 --> Use callback 'return_empty_string':
43 --> Use callback 'return_false':
46 --> Use callback 'return_null':
49 --> Use callback 'return_string':
52 --> Use callback 'return_zero':
/PHP-7.3/ext/standard/tests/assert/
H A Dassert_variation.phpt6 assert.callback = f1
31 echo "Initial values: ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n";
39 echo "ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n";
46 echo "ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n";
54 echo "ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n";
61 echo "ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n\n";
69 echo "ini.get(\"assert.callback\") => [".ini_get("assert.callback")."]\n\n";
83 ini.get("assert.callback") => [f2]
92 ini.get("assert.callback") => [f2]
101 ini.get("assert.callback") => [f2]
[all …]
/PHP-7.3/ext/spl/examples/
H A Dcallbackfilteriterator.inc21 const USE_FALSE = 0; /**< mode: accept no elements, no callback */
23 const USE_VALUE = 2; /**< mode: pass value to callback */
24 const USE_KEY = 3; /**< mode: pass key to callback */
25 const USE_BOTH = 4; /**< mode: pass value and key to callback */
29 private $callback; /**< callback to use */
38 * @param callback callback function
45 $this->callback = $callback;
50 /** Call the filter callback
51 * @return result of filter callback
72 return (bool) call_user_func($this->callback, &$this->key);
[all …]

Completed in 26 milliseconds

12345678910>>...15