function f() { self::nonStaticButSelfClass(); static::nonStaticButSelfClass(); parent::nonStaticButSelfClass(); P::nonStaticAClass(); P::staticAClass(); A1::nonStaticButSelfClass(); \a1::nonStaticButSelfClass(); b::nonStaticButSelfClass(); }
public function test() { a1::foo(); }
// non-existant method, so no find self::m17(); // non-existant method, so no find static::m25(); // non-existant method, so no find self::m27(); // non-existant method, so no find return new static($msg->shift(), $msg->shift(), $msg->toArray()); } private function m25() { print __CLASS__ . "\n"; } private function m27() { print __CLASS__ . "\n"; } } $o = new a4(); a4::m1(); // fails a4::m2(); // fails a4::m3(); // fails a4::m4(); // OK (WOn't show) a4::m8(); // non existant a1::m9(); // non existant
} } } namespace absolute\complex { class path2 { public static function a() { } } } namespace x { use one_identifier; use absolute_path; use complex\path; use absolute\complex\path2; use one_identifier3 as a1; use absolute_path3 as a2; use complex\path3 as a3; use absolute\complex\path32 as a4; print one_identifier::a(); print absolute_path::a(); print path::a(); print path2::a(); print a1::a(); print \a1::a(); print one_identifier3::a(); print a2::a(); print a3::a(); print a4::a(); }