Annotation of embedaddon/php/Zend/tests/class_alias_017.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Testing alias with get_called_class() and get_class()
3: --FILE--
4: <?php
5:
6: class foo {
7: public function __construct() {
8: echo get_called_class(), "\n";
9: }
10: static public function test() {
11: echo get_class(), "\n";
12: }
13: }
14:
15: class_alias('foo', 'bar');
16:
17: new bar;
18:
19:
20: class baz extends bar {
21: }
22:
23: new baz;
24: baz::test();
25:
26: bar::test();
27:
28: ?>
29: --EXPECTF--
30: foo
31: baz
32: foo
33: foo
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>