mirror of
https://github.com/php/php-src.git
synced 2024-11-27 20:03:40 +08:00
8d00385871
Per RFC https://wiki.php.net/rfc/reclassify_e_strict While reviewing this, found that there are still three E_STRICTs left in libraries - need to discuss those.
36 lines
624 B
PHP
36 lines
624 B
PHP
--TEST--
|
|
Passing Closure as parameter to an non-existent function
|
|
--FILE--
|
|
<?php
|
|
|
|
class foo {
|
|
public static function __callstatic($x, $y) {
|
|
var_dump($x,$y);
|
|
return 1;
|
|
}
|
|
|
|
public function teste() {
|
|
return foo::x(function &($a=1,$b) { });
|
|
}
|
|
}
|
|
|
|
var_dump(call_user_func(array('foo', 'teste')));
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: %son-static method foo::teste() should not be called statically in %s on line %d
|
|
%string|unicode%(1) "x"
|
|
array(1) {
|
|
[0]=>
|
|
object(Closure)#%d (1) {
|
|
["parameter"]=>
|
|
array(2) {
|
|
["$a"]=>
|
|
string(10) "<required>"
|
|
["$b"]=>
|
|
string(10) "<required>"
|
|
}
|
|
}
|
|
}
|
|
int(1)
|