/php-src/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 …]
|
H A D | parameter_type_variance.phpt | 7 function testParentClass(Foo $foo) {} 8 function testBothClass(Foo $foo) {} 9 function testChildClass($foo) {} 10 function testNoneClass($foo) {} 14 function testParentClass($foo) {} 15 function testBothClass(Foo $foo) {} 16 function testChildClass(Foo $foo) {} 17 function testNoneClass($foo) {}
|
H A D | parameter_type_variance_2.phpt | 7 function testParentBuiltin(int $foo) {} 8 function testBothBuiltin(int $foo) {} 9 function testChildBuiltin($foo) {} 10 function testNoneBuiltin($foo) {} 14 function testParentBuiltin($foo) {} 15 function testBothBuiltin(int $foo) {} 16 function testChildBuiltin(int $foo) {} 17 function testNoneBuiltin($foo) {}
|
/php-src/Zend/tests/ |
H A D | function_exists_basic.phpt | 2 function_exists function : basic functionality 11 echo "Internal function: "; 14 echo "User defined function: "; 15 function f() {} 21 echo "Non existent function: "; 26 static function f() {} 32 Internal function: bool(true) 33 User defined function: bool(true) 35 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 | debug_backtrace_options.phpt | 6 function backtrace_print($opt = null) 15 function doit($a, $b, $how) 89 [function] => doit 103 [function] => doCall 153 [function] => doit 167 [function] => doCall 217 [function] => doit 231 [function] => doCall 277 [function] => doit 336 [function] => doit [all …]
|
H A D | gh8962.phpt | 2 GH-8962: Display function name when var_dumping fake closure 8 public function baz() {} 9 public static function qux() {} 12 function quux() {} 23 ["function"]=> 30 ["function"]=> 34 ["function"]=> 38 ["function"]=>
|
H A D | gh10072.phpt | 19 public function stream_cast(int $castAs) 25 public function stream_close(): void 35 public function stream_read(int $count) 41 public function stream_seek(int $offset, int $whence = SEEK_SET): bool 47 public function stream_set_option(int $option, int $arg1, ?int $arg2): bool 53 public function stream_stat() 59 public function stream_tell() 65 public function stream_truncate(int $newSize): bool 71 public function stream_write(string $data) 76 public function unlink(string $path): bool [all …]
|
/php-src/ext/standard/tests/array/ |
H A D | array_map_variation16.phpt | 2 Test array_map() function : usage variations - failing built-in functions & language constructs 41 …ment #1 ($callback) must be a valid callback or null, function "echo" not found or invalid functio… 43 …ent #1 ($callback) must be a valid callback or null, function "array" not found or invalid functio… 45 …ent #1 ($callback) must be a valid callback or null, function "empty" not found or invalid functio… 47 …ment #1 ($callback) must be a valid callback or null, function "eval" not found or invalid functio… 49 …ment #1 ($callback) must be a valid callback or null, function "exit" not found or invalid functio… 51 …ent #1 ($callback) must be a valid callback or null, function "isset" not found or invalid functio… 53 …ment #1 ($callback) must be a valid callback or null, function "list" not found or invalid functio… 55 …ent #1 ($callback) must be a valid callback or null, function "print" not found or invalid functio…
|
H A D | array_udiff_assoc_variation5.phpt | 2 Test array_udiff_assoc() function : usage variation - incorrect comparison functions 10 echo "\n-- comparison function with an incorrect return value --\n"; 11 function incorrect_return_value ($val1, $val2) { 16 echo "\n-- comparison function taking too many parameters --\n"; 17 function too_many_parameters ($val1, $val2, $val3) { 26 echo "\n-- comparison function taking too few parameters --\n"; 27 function too_few_parameters ($val1) { 36 -- comparison function with an incorrect return value -- 42 -- comparison function taking too many parameters -- 43 Exception: Too few arguments to function too_many_parameters(), 2 passed and exactly 3 expected [all …]
|
H A D | array_udiff_uassoc_variation6.phpt | 2 Test array_udiff_uassoc() function : usage variation 10 echo "\n-- comparison function with an incorrect return value --\n"; 11 function incorrect_return_value ($val1, $val2) { 16 echo "\n-- comparison function taking too many parameters --\n"; 17 function too_many_parameters ($val1, $val2, $val3) { 26 echo "\n-- comparison function taking too few parameters --\n"; 27 function too_few_parameters ($val1) { 36 -- comparison function with an incorrect return value -- 42 -- comparison function taking too many parameters -- 43 Exception: Too few arguments to function too_many_parameters(), 2 passed and exactly 3 expected [all …]
|
H A D | array_uintersect_assoc_variation5.phpt | 2 Test array_uintersect_assoc() function : usage variation - differing comparison functions 10 echo "\n-- comparison function with an incorrect return value --\n"; 11 function incorrect_return_value ($val1, $val2) { 16 echo "\n-- comparison function taking too many parameters --\n"; 17 function too_many_parameters ($val1, $val2, $val3) { 26 echo "\n-- comparison function taking too few parameters --\n"; 27 function too_few_parameters ($val1) { 36 -- comparison function with an incorrect return value -- 40 -- comparison function taking too many parameters -- 41 Exception: Too few arguments to function too_many_parameters(), 2 passed and exactly 3 expected [all …]
|
H A D | array_uintersect_uassoc_variation6.phpt | 2 Test array_uintersect_uassoc() function : usage variation - incorrect callbacks 10 echo "\n-- comparison function with an incorrect return value --\n"; 11 function incorrect_return_value ($val1, $val2) { 16 echo "\n-- comparison function taking too many parameters --\n"; 17 function too_many_parameters ($val1, $val2, $val3) { 26 echo "\n-- comparison function taking too few parameters --\n"; 27 function too_few_parameters ($val1) { 36 -- comparison function with an incorrect return value -- 40 -- comparison function taking too many parameters -- 41 Exception: Too few arguments to function too_many_parameters(), 2 passed and exactly 3 expected [all …]
|
H A D | array_uintersect_variation5.phpt | 2 Test array_uintersect() function : usage variation - differing comparison functions 10 echo "\n-- comparison function with an incorrect return value --\n"; 11 function incorrect_return_value ($val1, $val2) { 16 echo "\n-- comparison function taking too many parameters --\n"; 17 function too_many_parameters ($val1, $val2, $val3) { 26 echo "\n-- comparison function taking too few parameters --\n"; 27 function too_few_parameters ($val1) { 36 -- comparison function with an incorrect return value -- 40 -- comparison function taking too many parameters -- 41 Exception: Too few arguments to function too_many_parameters(), 2 passed and exactly 3 expected [all …]
|
H A D | shuffle_basic1.phpt | 2 Test shuffle() function : basic functionality - array with default keys 9 * before and after shuffle() function is applied on it 20 /* Testing shuffle() function with array of integers */ 26 // applying shuffle() function on the input array of integers 27 echo "\n-- return value from shuffle() function --\n"; 33 /* Testing shuffle() function with array of strings */ 40 echo "\n-- return value from shuffle() function --\n"; 73 -- return value from shuffle() function -- 76 -- resultant array after shuffle() function is applied -- 120 -- return value from shuffle() function -- [all …]
|
/php-src/ext/spl/tests/ |
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, $… 110 = function = 125 = anonymous function =
|
H A D | iterator_068.phpt | 7 function foo() { 10 function rewind(): void {} 11 function valid(): bool {} 12 function current(): mixed {} 13 function key(): mixed {} 14 function next(): void {} 18 function __destruct() {
|
/php-src/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-src/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 …]
|
H A D | ReflectionNamedType.phpt | 6 function testInternalTypes(?Traversable $traversable): ?string { 10 function testUserDefinedTypes(?Test $traversable): ?Test { 14 $function = new ReflectionFunction('testInternalTypes'); 15 $type = $function->getParameters()[0]->getType(); 16 $return = $function->getReturnType(); 23 $function = new ReflectionFunction('testUserDefinedTypes'); 24 $type = $function->getParameters()[0]->getType(); 25 $return = $function->getReturnType();
|
/php-src/ext/session/tests/user_session_module/ |
H A D | gh9584.phpt | 10 public function open($path, $sessname): bool { 14 public function close(): bool { 18 public function read($sessid): string|false { 22 public function write($sessid, $sessdata): bool { 26 public function destroy($sessid): bool { 30 public function gc($maxlifetime): int|false { 34 public function create_sid(): string { 38 public function validateId($sid): bool { 42 public function updateTimestamp($sessid, $sessdata): bool {
|
H A D | session_set_save_handler_iface_002.phpt | 13 public function open($path, $name): bool; 14 public function close(): bool; 15 public function read($id): string|false; 16 public function write($id, $data): bool; 17 public function destroy($id): bool; 24 public function open($path, $name): bool { 32 public function close(): bool { 36 public function read($id): string|false { 40 public function write($id, $data): bool { 45 public function destroy($id): bool { [all …]
|
H A D | bug79091.phpt | 9 public function close(): bool 14 public function destroy($session_id): bool 19 public function gc($maxlifetime): int|false 24 public function open($save_path, $session_name): bool 29 public function read($session_id): string|false 34 public function write($session_id, $session_data): bool 39 public function create_sid(): string 44 public function updateTimestamp($key, $val): bool 49 public function validateId($key): bool
|
/php-src/ext/date/tests/ |
H A D | gmmktime_variation7.phpt | 2 Test gmmktime() function : usage variation - Checking with few optional arguments. 14 echo "\n-- Testing gmmktime() function with one optional argument --\n"; 17 echo "\n-- Testing gmmktime() function with two optional argument --\n"; 20 echo "\n-- Testing gmmktime() function with three optional argument --\n"; 23 echo "\n-- Testing gmmktime() function with four optional argument --\n"; 26 echo "\n-- Testing gmmktime() function with five optional argument --\n"; 33 -- Testing gmmktime() function with one optional argument -- 36 -- Testing gmmktime() function with two optional argument -- 39 -- Testing gmmktime() function with three optional argument -- 42 -- Testing gmmktime() function with four optional argument -- [all …]
|