public function bar(\SomeMethod $method)
 {
     // SOMETHING SOMETHING
     parent::fo();
 }
Exemplo n.º 2
0
<?php

class foo
{
    function bar()
    {
        var_dump(get_class());
    }
}
class foo2 extends foo
{
}
foo::bar();
foo2::bar();
$f1 = new foo();
$f2 = new foo2();
$f1->bar();
$f2->bar();
var_dump(get_class());
var_dump(get_class("qwerty"));
var_dump(get_class($f1));
var_dump(get_class($f2));
echo "Done\n";
    {
        echo 'I am not static!';
    }
    static function staticBar()
    {
        echo 'I am static!';
    }
    function baz()
    {
        self::bar();
        static::bar();
        self::staticBar();
        static::staticBar();
    }
}
class foo2 extends foo3
{
    function baz()
    {
        parent::bar();
    }
}
foo4::staticBar();
foo3::staticBar();
foo2::staticBar();
foo::staticBar();
foo4::bar();
foo3::bar();
foo2::bar();
foo::bar();