// okay to access static method via class var_dump(P::$psProp); // okay to access static property via class, but leading $ needed!! var_dump(P::MYPI); // okay to access const via class $clName = "P"; var_dump($clName::MYPI); // okay to use a string containing class name echo "-----------------------------\n"; P::f1(); echo "-----------------------------\n"; $m = new M(); $n = new N(); $p = new P(1000); echo "-----------------------------\n"; $m->b1(); echo "-----------------------------\n"; $n->b1(); echo "-----------------------------\n"; $p->b1(); echo "-----------------------------\n"; // simplified version of static class Base { public function b() { // echo "Inside " . __METHOD__ . "\n"; static::f(); echo "The static context here is " . static::class . "\n"; } public function f()