php-src/Zend/tests/call_static_002.phpt

27 lines
399 B
Plaintext
Raw Normal View History

2008-06-03 23:30:04 +08:00
--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'));
?>
--EXPECTF--
nonstatic
string(3) "aAa"
static
string(3) "aAa"