/PHP-7.4/Zend/tests/type_declarations/ |
H A D | scalar_none.phpt | 7 'int' => function (int $i) { return $i; }, 8 'float' => function (float $f) { return $f; }, 9 'string' => function (string $s) { return $s; }, 10 'bool' => function (bool $b) { return $b; }, 11 'int nullable' => function (int $i = NULL) { return $i; }, 12 'float nullable' => function (float $f = NULL) { return $f; }, 13 'string nullable' => function (string $s = NULL) { return $s; }, 14 'bool nullable' => function (bool $b = NULL) { return $b; } 17 foreach ($functions as $type => $function) { 20 var_dump($function()); [all …]
|
/PHP-7.4/ext/spl/tests/ |
H A D | CallbackFilterIteratorTest.phpt | 7 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 D | RecursiveCallbackFilterIteratorTest.phpt | 7 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 D | iterator_068.phpt | 7 function foo() { 10 function rewind() {} 11 function valid() {} 12 function current() {} 13 function key() {} 14 function next() {} 18 function __destruct() {
|
/PHP-7.4/ext/standard/tests/array/ |
H A D | array_filter_variation8.phpt | 2 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 D | array_filter_variation7.phpt | 2 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 D | array_udiff_variation5.phpt | 2 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 D | array_filter_variation4.phpt | 2 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 D | array_map_error.phpt | 2 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 D | array_product_variation3.phpt | 2 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 D | shuffle_basic1.phpt | 2 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 …]
|
H A D | array_map_variation16.phpt | 2 Test array_map() function : usage variations - failing built-in functions & language constructs 43 …ray_map() expects parameter 1 to be a valid callback, function 'echo' not found or invalid functio… 47 …ay_map() expects parameter 1 to be a valid callback, function 'array' not found or invalid functio… 51 …ay_map() expects parameter 1 to be a valid callback, function 'empty' not found or invalid functio… 55 …ray_map() expects parameter 1 to be a valid callback, function 'eval' not found or invalid functio… 59 …ray_map() expects parameter 1 to be a valid callback, function 'exit' not found or invalid functio… 63 …ay_map() expects parameter 1 to be a valid callback, function 'isset' not found or invalid functio… 67 …ray_map() expects parameter 1 to be a valid callback, function 'list' not found or invalid functio… 71 …ay_map() expects parameter 1 to be a valid callback, function 'print' not found or invalid functio…
|
/PHP-7.4/ext/opcache/tests/ |
H A D | preload_variance.inc | 6 public function method(X $a) {} 9 public function method($a) : X {} 14 public function method($a): self {} 15 public function method2($a): C {} 18 public function method($a): self {} 19 public function method2($a): D {} 26 public function method($a): I {} 29 public function method($a): J {} 34 public function method($a): K {} 37 public function method($a): L {} [all …]
|
/PHP-7.4/ext/session/tests/ |
H A D | session_set_save_handler_iface_002.phpt | 22 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 …]
|
H A D | bug79091.phpt | 11 public function close() 16 public function destroy($session_id) 21 public function gc($maxlifetime) 26 public function open($save_path, $session_name) 31 public function read($session_id) 36 public function write($session_id, $session_data) 41 public function create_sid() 46 public function updateTimestamp($key, $val) 51 public function validateId($key)
|
H A D | bug61728.phpt | 7 function output_html($ext) { 11 function open ($save_path, $session_name) { 15 function close() { 19 function read ($id) { 23 function write ($id, $sess_data) { 30 function destroy ($id) { 34 function gc ($maxlifetime) {
|
/PHP-7.4/Zend/tests/ |
H A D | function_exists_basic.phpt | 2 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 D | closure_bug66622.phpt | 6 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 D | bug70898.phpt | 5 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 D | bug60573.phpt | 7 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.4/tests/lang/ |
H A D | returnByReference.007.phpt | 6 static function returnConstantByValue() { 10 static function &returnConstantByRef() { 14 static function &returnVariableByRef() { 18 static function &returnFunctionCallByRef($functionToCall) { 23 echo "\n---> 1. Via a return by ref function call, assign by reference the return value of a functi… 30 echo "\n---> 2. Via a return by ref function call, assign by reference the return value of a functi… 37 echo "\n---> 3. Via a return by ref function call, assign by reference the return value of a functi… 46 ---> 1. Via a return by ref function call, assign by reference the return value of a function that … 52 ---> 2. Via a return by ref function call, assign by reference the return value of a function that … 58 ---> 3. Via a return by ref function call, assign by reference the return value of a function that …
|
H A D | returnByReference.008.phpt | 6 function returnConstantByValue() { 10 function &returnConstantByRef() { 14 function &returnVariableByRef() { 18 function &returnFunctionCallByRef($functionToCall) { 24 echo "\n---> 1. Via a return by ref function call, assign by reference the return value of a functi… 31 echo "\n---> 2. Via a return by ref function call, assign by reference the return value of a functi… 38 echo "\n---> 3. Via a return by ref function call, assign by reference the return value of a functi… 47 ---> 1. Via a return by ref function call, assign by reference the return value of a function that … 53 ---> 2. Via a return by ref function call, assign by reference the return value of a function that … 59 ---> 3. Via a return by ref function call, assign by reference the return value of a function that …
|
/PHP-7.4/ext/reflection/tests/ |
H A D | ReflectionClass_getModifierNames_basic.phpt | 14 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.4/Zend/tests/generators/ |
H A D | bug78434.phpt | 6 $function = function () { 10 $wrapper = function () use ($function) { 11 $generator = $function(); 15 $generator = $function();
|
H A D | bug71013.phpt | 7 function __construct() { echo "Constructing new FooBar\n"; } 8 function __destruct() { echo "Destructing FooBar\n"; } 9 function current () { throw new Exception; } 10 function key () { return 0; } 11 function next () {} 12 function rewind () {} 13 function valid () { return true; } 16 function foo() { 25 function bar() {
|