mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
ded3d984c6
EXPECTF logic in run-tests.php is considerable, so let's avoid it.
27 lines
398 B
PHP
27 lines
398 B
PHP
--TEST--
|
|
Testing __call and __callstatic with callbacks
|
|
--FILE--
|
|
<?php
|
|
|
|
class Foo {
|
|
public function __call($a, $b) {
|
|
print "nonstatic\n";
|
|
var_dump($a);
|
|
}
|
|
static public function __callStatic($a, $b) {
|
|
print "static\n";
|
|
var_dump($a);
|
|
}
|
|
}
|
|
|
|
$a = new Foo;
|
|
call_user_func(array($a, 'aAa'));
|
|
call_user_func(array('Foo', 'aAa'));
|
|
|
|
?>
|
|
--EXPECT--
|
|
nonstatic
|
|
string(3) "aAa"
|
|
static
|
|
string(3) "aAa"
|