xref: /PHP-7.2/Zend/tests/call_static_006.phpt (revision e97d5fab)
1--TEST--
2Testing __callStatic
3--FILE--
4<?php
5
6class foo {
7	public function aa() {
8		print "ok\n";
9	}
10	static function __callstatic($a, $b) {
11		var_dump($a);
12	}
13}
14
15foo::aa();
16
17$b = 'AA';
18foo::$b();
19
20foo::__construct();
21
22?>
23--EXPECTF--
24Deprecated: Non-static method foo::aa() should not be called statically in %s on line %d
25ok
26
27Deprecated: Non-static method foo::aa() should not be called statically in %s on line %d
28ok
29
30Fatal error: Uncaught Error: Cannot call constructor in %s:%d
31Stack trace:
32#0 {main}
33  thrown in %s on line %d
34