Annotation of embedaddon/php/Zend/tests/bug26802.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #26802 (Can't call static method using a variable)
3: --FILE--
4: <?php
5:
6: function global_func()
7: {
8: echo __METHOD__ . "\n";
9: }
10:
11: $function = 'global_func';
12: $function();
13:
14: class foo
15: {
16: static $method = 'global_func';
17:
18: static public function foo_func()
19: {
20: echo __METHOD__ . "\n";
21: }
22: }
23:
24: /* The following is a BC break with PHP 4 where it would
25: * call foo::fail. In PHP 5 we first evaluate static class
26: * properties and then do the function call.
27: */
28: $method = 'foo_func';
29: foo::$method();
30:
31:
32: ?>
33: ===DONE===
34: --EXPECT--
35: global_func
36: foo::foo_func
37: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>