// 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
<?php $o = new a4(); a4::m1(); static::m1(); self::m1(); parent::m1(); static::$p1; self::$p1; parent::$p1; static::c1; self::c1; parent::c1; class x { function y() { static::m2(); self::m2(); parent::m2(); static::$p2; self::$p2; parent::$p2; static::c2; self::c2; parent::c2; } }