2008-06-03 15:36:59 +00:00
|
|
|
--TEST--
|
|
|
|
Testing __callStatic
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
class foo {
|
|
|
|
public function aa() {
|
|
|
|
print "ok\n";
|
|
|
|
}
|
|
|
|
static function __callstatic($a, $b) {
|
|
|
|
var_dump($a);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
foo::aa();
|
|
|
|
|
|
|
|
$b = 'AA';
|
|
|
|
foo::$b();
|
|
|
|
|
|
|
|
foo::__construct();
|
|
|
|
|
|
|
|
?>
|
|
|
|
--EXPECTF--
|
2015-03-15 08:47:25 +00:00
|
|
|
Deprecated: Non-static method foo::aa() should not be called statically in %s on line %d
|
2008-06-03 15:36:59 +00:00
|
|
|
ok
|
|
|
|
|
2015-03-15 08:47:25 +00:00
|
|
|
Deprecated: Non-static method foo::aa() should not be called statically in %s on line %d
|
2008-06-03 15:36:59 +00:00
|
|
|
ok
|
|
|
|
|
2015-05-17 22:31:43 +00:00
|
|
|
Fatal error: Uncaught Error: Cannot call constructor in %s:%d
|
2015-05-15 19:04:07 +00:00
|
|
|
Stack trace:
|
|
|
|
#0 {main}
|
|
|
|
thrown in %s on line %d
|