/php-src/Zend/tests/function_arguments/ |
H A D | call_with_trailing_comma_basic.phpt | 2 Allow trailing commas in function and method calls 5 function foo(...$args) { 10 'function', 16 public function __construct(...$args) { 21 public function bar(...$args) { 26 public function __invoke(...$args) { 47 $bar = function(...$args) { 57 # Make sure to hit the "not really a function" language constructs 65 string(8) "function"
|
/php-src/Zend/tests/type_declarations/union_types/variance/ |
H A D | valid.phpt | 13 public function method(int $a): int|float {} 14 public function method2(B|string $a): A|string {} 15 public function method3(Y|B $a): X|A {} 16 public function method4(Traversable|X $a): iterable|X {} 22 public function method(int|float $a): int {} 23 public function method2(A|string $a): B|string {} 24 public function method3(A|X $a): B|Y {} 25 public function method4(iterable|X $a): Traversable|X {}
|
/php-src/Zend/tests/ |
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) { }
|
H A D | bug63816.phpt | 8 function foo(); 13 function foo(); 18 function foo(); 23 function foo() 30 function foo() 37 function foo()
|
H A D | get_class_methods_002.phpt | 7 function a(); 8 function b(); 12 public function a() { } 13 public function b() { } 15 public function __construct() { 20 public function __destruct() { }
|
H A D | ns_089.phpt | 6 function foo(){echo __FUNCTION__,"\n";} 7 function bar(){echo __FUNCTION__,"\n";} 10 class A { function __construct() {echo __METHOD__,"\n";} } 11 class B { function __construct() {echo __METHOD__,"\n";} } 12 class C { function __construct() {echo __METHOD__,"\n";} } 13 class D { function __construct() {echo __METHOD__,"\n";} } 23 function foo, 24 function bar as buz, 29 class C { function __construct() {echo __METHOD__,"\n";}} 30 function bar(){echo __FUNCTION__,"\n";}
|
H A D | ns_090.phpt | 6 function foo(){echo __FUNCTION__,"\n";} 7 function bar(){echo __FUNCTION__,"\n";} 10 class A { function __construct() {echo __METHOD__,"\n";} } 11 class B { function __construct() {echo __METHOD__,"\n";} } 12 class C { function __construct() {echo __METHOD__,"\n";} } 13 class D { function __construct() {echo __METHOD__,"\n";} } 18 use Foo\Bar\Baz\{ function foo, function bar as buz, const FOO, const BAR AS BOZ }; 20 class C { function __construct() {echo __METHOD__,"\n";}} 21 function bar(){echo __FUNCTION__,"\n";}
|
H A D | bug53958.phpt | 7 $fn1 = function() use ($a) {echo "$a\n"; $a++;}; 8 $fn2 = function() use ($a) {echo "$a\n"; $a++;}; 17 $fn1 = function() use (&$b) {echo "$b\n"; $b++;}; 18 $fn2 = function() use (&$b) {echo "$b\n"; $b++;}; 27 $fn1 = function() use (&$c) {echo "$c\n"; $c++;}; 28 $fn2 = function() use ($c) {echo "$c\n"; $c++;}; 37 $fn1 = function() use ($d) {echo "$d\n"; $d++;}; 38 $fn2 = function() use (&$d) {echo "$d\n"; $d++;};
|
H A D | gh8841.phpt | 2 GH-8841 (php-cli core dump calling a badly formed function) 5 register_shutdown_function(function() { 11 register_shutdown_function(function() { 17 eval('function g($x): int { return $x; }'); 18 eval('function f($x): void { return $x; }'); 21 Fatal error: A void function must not return a value in %s on line %d 26 Fatal error: Uncaught Error: Call to undefined function f() in %s:%d 28 #0 [internal function]: {closure:%s:%d}()
|
H A D | bug33710.phpt | 8 function offsetExists($offset): bool { return true;} 9 function offsetGet($offset): mixed { return null; } 10 function offsetSet($offset, $value): void {/*...*/} 11 function offsetUnset($offset): void {/*...*/} 13 function fail() 18 function succeed()
|
/php-src/Zend/tests/return_types/ |
H A D | never_disallowed2.phpt | 2 never return type: unacceptable cases: empty return in a function 6 function foo(): never { 7 return; // not permitted in a never function 10 // Note the lack of function call: function validated at compile-time 13 Fatal error: A never-returning function must not return in %s on line %d
|
H A D | never_disallowed1.phpt | 2 never return type: unacceptable cases: any return in a function 6 function foo(): never { 7 return "hello"; // not permitted in a never function 10 // Note the lack of function call: function validated at compile-time 13 Fatal error: A never-returning function must not return in %s on line %d
|
H A D | never_covariance.phpt | 8 public function foo(): string 13 public function bar(): never 18 public function &baz() 22 public function someReturningStaticMethod() : static 29 public function foo(): never 34 public function bar(): never 39 public function &baz(): never 44 public function someReturningStaticMethod(): never
|
/php-src/tests/lang/ |
H A D | 032.phpt | 6 function foo() {} 10 function foo() {} 14 function foo() {} 21 function foo() {} 27 function foo() {} 28 function foo() {}
|
H A D | 019.phpt | 6 eval("function test() { echo \"hey, this is a function inside an eval()!\\n\"; }"); 19 hey, this is a function inside an eval()! 21 hey, this is a function inside an eval()! 23 hey, this is a function inside an eval()! 25 hey, this is a function inside an eval()! 27 hey, this is a function inside an eval()! 29 hey, this is a function inside an eval()! 31 hey, this is a function inside an eval()! 33 hey, this is a function inside an eval()! 35 hey, this is a function inside an eval()! [all …]
|
/php-src/Zend/tests/type_declarations/intersection_types/variance/ |
H A D | valid7.phpt | 10 function method(): object {} 11 function method2(): object|int {} 12 function method3(): Y|int {} 15 function method(): X&Y {} 16 function method2(): X&Y {} 17 function method3(): X&Y {}
|
/php-src/ext/reflection/tests/ |
H A D | ReflectionFunction_getExtensionName.phpt | 5 function foo() {} 7 $function = new ReflectionFunction('sort'); 8 var_dump($function->getExtensionName()); 10 $function = new ReflectionFunction('foo'); 11 var_dump($function->getExtensionName());
|
/php-src/Zend/tests/type_declarations/dnf_types/variance/ |
H A D | valid7.phpt | 10 function method1(): object {} 11 function method2(): object|int {} 12 function method3(): Y|int {} 15 function method1(): (X&Y)|Countable {} 16 function method2(): (X&Y)|int {} 17 function method3(): (X&Y)|int {}
|
/php-src/ext/session/tests/user_session_module/ |
H A D | session_set_save_handler_class_016.phpt | 2 Test session_set_save_handler() function: class with create_sid 13 echo "*** Testing session_set_save_handler() function: class with create_sid ***\n"; 18 public function open($path, $name): bool { 26 public function close(): bool { 30 public function read($id): string|false { 34 public function write($id, $data): bool { 38 public function destroy($id): bool { 42 public function gc($maxlifetime): int|false { 51 public function create_sid(): string { 74 *** Testing session_set_save_handler() function: class with create_sid ***
|
H A D | session_set_save_handler_class_017.phpt | 2 Test session_set_save_handler() function: class with create_sid 13 echo "*** Testing session_set_save_handler() function: class with create_sid ***\n"; 18 public function open($path, $name): bool { 26 public function close(): bool { 30 public function read($id): string|false { 34 public function write($id, $data): bool { 38 public function destroy($id): bool { 42 public function gc($maxlifetime): int|false { 51 public function create_sid(): string { 75 *** Testing session_set_save_handler() function: class with create_sid ***
|
H A D | session_set_save_handler_iface_003.phpt | 2 Test session_set_save_handler() function: id interface 10 echo "*** Testing session_set_save_handler() function: id interface ***\n"; 15 public function open($path, $name): bool { 23 public function close(): bool { 27 public function read($id): string|false { 31 public function write($id, $data): bool { 36 public function destroy($id): bool { 40 public function gc($maxlifetime): int|false { 50 public function create_sid(): string { 74 *** Testing session_set_save_handler() function: id interface ***
|
H A D | session_set_save_handler_sid_002.phpt | 2 Test session_set_save_handler() function: create_sid 12 echo "*** Testing session_set_save_handler() function: create_sid ***\n"; 17 public function open($path, $name): bool { 25 public function close(): bool { 29 public function read($id): string|false { 33 public function write($id, $data): bool { 37 public function destroy($id): bool { 42 public function gc($maxlifetime): int|false { 52 public function create_sid() { 74 *** Testing session_set_save_handler() function: create_sid ***
|
/php-src/ext/standard/tests/array/ |
H A D | array_intersect_ukey_variation8.phpt | 2 Test array_intersect_ukey() function : usage variation - Passing non-existing function name to call… 11 //function name within double quotes 18 //function name within single quotes 28 …t_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid f… 29 …t_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid f…
|
H A D | array_diff_ukey_variation10.phpt | 2 Test array_diff_ukey() function : usage variation - Passing non-existing function name to callback 11 //function name within double quotes 18 //function name within single quotes 28 …f_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid f… 29 …f_ukey(): Argument #3 must be a valid callback, function "unknown_function" not found or invalid f…
|
/php-src/ext/standard/tests/image/ |
H A D | bug75708.phpt | 11 function stream_open($file, $mode) { 15 function stream_read($count) { 18 function stream_eof() { 21 function stream_seek($offset, $whence) { 24 function stream_stat() { 27 function url_stat($file) { 30 function stream_tell() { 33 function stream_close() {
|