xref: /PHP-5.6/Zend/tests/class_alias_017.phpt (revision d9d47f37)
1--TEST--
2Testing alias with get_called_class() and get_class()
3--FILE--
4<?php
5
6class 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
15class_alias('foo', 'bar');
16
17new bar;
18
19
20class baz extends bar {
21}
22
23new baz;
24baz::test();
25
26bar::test();
27
28?>
29--EXPECTF--
30foo
31baz
32foo
33foo
34