blob: 67715947af4fa68e75aff3efb4f01caee956d017 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
--TEST--
001: Class in namespace
--FILE--
<?php
namespace test\ns1;
class Foo {
function __construct() {
echo __CLASS__,"\n";
}
function bar() {
echo __CLASS__,"\n";
}
static function baz() {
echo __CLASS__,"\n";
}
}
$x = new Foo;
$x->bar();
Foo::baz();
$y = new \test\ns1\Foo;
$y->bar();
\test\ns1\Foo::baz();
--EXPECT--
test\ns1\Foo
test\ns1\Foo
test\ns1\Foo
test\ns1\Foo
test\ns1\Foo
test\ns1\Foo
|