Home
last modified time | relevance | path

Searched refs:function (Results 51 – 75 of 6062) sorted by relevance

12345678910>>...243

/PHP-7.2/Zend/tests/
H A Dmethod_exists_002.phpt7 static public function stat_a2() {
9 static private function stat_b2() {
11 static protected function stat_c2() {
14 private function method_a() {
16 protected function method_b() {
18 public function method_c() {
25 static public function stat_a() {
27 static private function stat_b() {
32 private function method_a() {
34 protected function method_b() {
[all …]
H A Dfunction_exists_basic.phpt2 function_exists function : basic functionality
12 echo "Internal function: ";
15 echo "User defined function: ";
16 function f() {}
22 echo "Non existent function: ";
27 static function f() {}
34 Internal function: bool(true)
35 User defined function: bool(true)
37 Non existent function: bool(false)
H A Dzend2.php.txt9 function increment_and_print()
20 function Instance()
41 function draw()
48 function draw()
124 function Name($_name)
129 function display()
142 function getName()
196 function MyCloneable()
201 function __clone()
261 function __construct()
[all …]
H A Dclosure_bug66622.phpt6 static function name() { return 'A'; }
7 function foo() {
8 $fn = function() { return static::name(); };
11 function bar() {
12 $fn = static function() { return static::name(); };
15 static function baz() {
16 $fn = function() { return static::name(); };
21 static function name() { return 'B'; }
24 function test() {
H A Dbug70898.phpt5 function m($f,$a){
12 …ts parameter 1 to be a valid callback, function '0000000000000000000000000000000000' not found or …
14 …array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function
16 …array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function
18 …array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function
20 …array_map() expects parameter 1 to be a valid callback, function '' not found or invalid function
H A Dbug60573.phpt7 public function setSelf(self $s) { }
13 public function setSelf(parent $s) { }
19 public function setSelf(Foo2 $s) { }
25 public function setSelf(parent $s) { }
34 public function setSelf(parent $s) { }
40 public function setSelf(Base $s) { }
46 public function setSelf(self $s) { }
52 public function setSelf(self $s) { }
58 public function setSelf(parent $s) { }
64 public function setSelf(parent $s) { }
[all …]
/PHP-7.2/ext/standard/tests/array/
H A Darray_filter_variation8.phpt2 Test array_filter() function : usage variations - Callback function with different return values
21 function callback1($input)
29 function callback2($input)
37 function callback3($input)
45 function callback4($input)
53 function callback5($input)
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_variation7.phpt2 Test array_filter() function : usage variations - anonymous callback functions
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
28 var_dump( array_filter($input, function() { return true; }) );
30 // anonymous callback function with argument and null statement
32 var_dump( array_filter($input, function($input) { }) );
38 Anonymous callback function with regular parameter and statement
47 Anonymous callback function with reference parameter
[all …]
H A Darray_udiff_variation5.phpt2 Test array_udiff() function : usage variation
13 // Initialise function arguments not being substituted (if any)
17 echo "\n-- comparison function with an incorrect return value --\n";
18 function incorrect_return_value ($val1, $val2) {
23 echo "\n-- comparison function taking too many parameters --\n";
24 function too_many_parameters ($val1, $val2, $val3) {
33 echo "\n-- comparison function taking too few parameters --\n";
34 function too_few_parameters ($val1) {
44 -- comparison function with an incorrect return value --
50 -- comparison function taking too many parameters --
[all …]
H A Darray_filter_variation4.phpt2 Test array_filter() function : usage variations - Different types of 'callback' function
23 // callback function without parameters and with return value
24 function callback1()
31 // callback function with parameter and without return value
32 function callback2($input)
40 function callback3()
46 // callback function with parameter and with return value
47 function callback4($input)
63 -- Callback function without parameter and with return --
85 -- Callback function without parameter and return --
[all …]
H A Darray_map_error.phpt2 Test array_map() function : error conditions
13 echo "\n-- Testing array_map() function with Zero arguments --\n";
18 function callback1() {
27 echo "\n-- Testing array_map() function with less no. of arrays than callback function arguments --…
29 function callback2($p, $q) {
38 echo "\n-- Testing array_map() function with more no. of arrays than callback function arguments --…
48 -- Testing array_map() function with Zero arguments --
53 -- Testing array_map() function with one less than expected no. of arguments --
58 -- Testing array_map() function with less no. of arrays than callback function arguments --
59 Exception: Too few arguments to function callback2(), 1 passed and exactly 2 expected
[all …]
H A Darray_walk_error1.phpt2 Test array_walk() function : error conditions
6 * Description: Apply a user function to every member of an array
17 function callback ($value, $key, $user_data) {
23 echo "-- Testing array_walk() function with zero arguments --\n";
26 echo "-- Testing array_walk() function with one argument --\n";
29 echo "-- Testing array_walk() function with non existent callback function --\n";
36 -- Testing array_walk() function with zero arguments --
40 -- Testing array_walk() function with one argument --
44 -- Testing array_walk() function with non existent callback function --
46 …alk() expects parameter 2 to be a valid callback, function 'non_existent' not found or invalid fun…
H A Darray_walk_recursive_error1.phpt2 Test array_walk_recursive() function : error conditions
6 * Description: Apply a user function to every member of an array
17 function callback ($value, $key, $user_data) {
23 echo "-- Testing array_walk_recursive() function with zero arguments --\n";
26 echo "-- Testing array_walk_recursive() function with one argument --\n";
30 echo "-- Testing array_walk_recursive() function with non existent callback function --\n";
37 -- Testing array_walk_recursive() function with zero arguments --
41 -- Testing array_walk_recursive() function with one argument --
45 -- Testing array_walk_recursive() function with non existent callback function --
47 …ive() expects parameter 2 to be a valid callback, function 'non_existent' not found or invalid fun…
H A Darray_product_variation3.phpt2 Test array_product() function : variation
13 echo "\n-- Testing array_product() function with one negative number --\n";
16 echo "\n-- Testing array_product() function with two negative numbers --\n";
19 echo "\n-- Testing array_product() function with three negative numbers --\n";
22 echo "\n-- Testing array_product() function with negative floats --\n";
25 echo "\n-- Testing array_product() function with negative floats --\n";
34 -- Testing array_product() function with one negative number --
37 -- Testing array_product() function with two negative numbers --
40 -- Testing array_product() function with three negative numbers --
43 -- Testing array_product() function with negative floats --
[all …]
H A Dshuffle_basic1.phpt2 Test shuffle() function : basic functionality - array with default keys
14 * before and after shuffle() function is applied on it
25 /* Testing shuffle() function with array of integers */
31 // applying shuffle() function on the input array of integers
32 echo "\n-- return value from shuffle() function --\n";
38 /* Testing shuffle() function with array of strings */
45 echo "\n-- return value from shuffle() function --\n";
78 -- return value from shuffle() function --
81 -- resultant array after shuffle() function is applied --
125 -- return value from shuffle() function --
[all …]
/PHP-7.2/ext/spl/tests/
H A DCallbackFilterIteratorTest.phpt7 function test($value, $key, $inner) {
13 static function test($value, $key, $inner) {
18 function test($value, $key, $inner) {
29 'instance method' => function() { return array(new A, 'test'); },
30 'static method' => function() { return array('B', 'test'); },
31 'static method (2)' => function() { return 'B::test'; },
32 'function' => function() { return 'test'; },
33 …'anonymous function' => function() { return function($value, $key, $inner) { return test($value, $…
104 = function =
119 = anonymous function =
H A DRecursiveCallbackFilterIteratorTest.phpt7 function test($value, $key, $inner) {
13 static function test($value, $key, $inner) {
18 function test($value, $key, $inner) {
32 'instance method' => function() { return array(new A, 'test'); },
33 'static method' => function() { return array('B', 'test'); },
34 'static method (2)' => function() { return 'B::test'; },
35 'function' => function() { return 'test'; },
36 …'anonymous function' => function() { return function($value, $key, $inner) { return test($value, $…
109 = function =
124 = anonymous function =
H A Diterator_068.phpt7 function foo() {
10 function rewind() {}
11 function valid() {}
12 function current() {}
13 function key() {}
14 function next() {}
18 function __destruct() {
/PHP-7.2/ext/session/tests/
H A Dsession_set_save_handler_iface_002.phpt22 public function open($path, $name);
23 public function close();
24 public function read($id);
25 public function write($id, $data);
26 public function destroy($id);
27 public function gc($maxlifetime);
41 public function close() {
45 public function read($id) {
53 public function destroy($id) {
57 public function gc($maxlifetime) {
[all …]
/PHP-7.2/Zend/tests/type_declarations/
H A Dscalar_none.phpt11 set_error_handler(function (int $errno, string $errmsg, string $file, int $line) use ($errnames) {
17 'int' => function (int $i) { return $i; },
18 'float' => function (float $f) { return $f; },
19 'string' => function (string $s) { return $s; },
20 'bool' => function (bool $b) { return $b; },
21 'int nullable' => function (int $i = NULL) { return $i; },
22 'float nullable' => function (float $f = NULL) { return $f; },
23 'string nullable' => function (string $s = NULL) { return $s; },
24 'bool nullable' => function (bool $b = NULL) { return $b; }
27 foreach ($functions as $type => $function) {
[all …]
/PHP-7.2/tests/lang/
H A DreturnByReference.007.phpt8 static function returnConstantByValue() {
12 static function &returnConstantByRef() {
16 static function &returnVariableByRef() {
20 static function &returnFunctionCallByRef($functionToCall) {
25 echo "\n---> 1. Via a return by ref function call, assign by reference the return value of a functi…
32 echo "\n---> 2. Via a return by ref function call, assign by reference the return value of a functi…
39 echo "\n---> 3. Via a return by ref function call, assign by reference the return value of a functi…
48 ---> 1. Via a return by ref function call, assign by reference the return value of a function that …
54 ---> 2. Via a return by ref function call, assign by reference the return value of a function that …
60 ---> 3. Via a return by ref function call, assign by reference the return value of a function that …
H A DreturnByReference.008.phpt8 function returnConstantByValue() {
12 function &returnConstantByRef() {
16 function &returnVariableByRef() {
20 function &returnFunctionCallByRef($functionToCall) {
26 echo "\n---> 1. Via a return by ref function call, assign by reference the return value of a functi…
33 echo "\n---> 2. Via a return by ref function call, assign by reference the return value of a functi…
40 echo "\n---> 3. Via a return by ref function call, assign by reference the return value of a functi…
49 ---> 1. Via a return by ref function call, assign by reference the return value of a function that …
55 ---> 2. Via a return by ref function call, assign by reference the return value of a function that …
61 ---> 3. Via a return by ref function call, assign by reference the return value of a function that …
/PHP-7.2/scripts/dev/
H A Dgenerate-phpt.phar278 The function name is not a valid PHP function name.
1318 public static function getInstance($optionalSections, $type = 'function') {
1599 public function setFunction($function) {
1659 public function setFunction($function) {
1719 public function setUp(gtfunction $function, $argumentNumber, $variationData) {
1768 protected $function;
1780 public function setFunction(gtFunction $function) {
1781 $this->function = $function;
1878 public static function getInstance($optionalSections, $type = 'function') {
1924 public static function getInstance ($optionalSections, $type = 'function') {
[all …]
/PHP-7.2/ext/reflection/tests/
H A DReflectionClass_getModifierNames_basic.phpt14 function __construct() {}
15 function __destruct() {}
16 private function a() {}
17 private static function b() {}
18 protected function c() {}
19 protected static function d() {}
20 public function e() {}
21 public static function f() {}
22 final function g() {}
23 function h() {}
[all …]
/PHP-7.2/ext/standard/tests/strings/
H A Dhebrev_variation2.phpt19 public function __toString() {
97 .The function tries to avoid breaking words
112 .The function tries to avoid breaking words
116 .The function tries to avoid breaking words
120 .The function tries to avoid breaking words
148 function
155 function
179 .The function tries to avoid breaking words
206 .The function tries to avoid breaking words
221 .The function tries to avoid breaking words
[all …]

Completed in 51 milliseconds

12345678910>>...243