Esempio n. 1
0
    {
        $this->bar();
    }
    public function callBaz()
    {
        $this->baz();
    }
    public function callFizzBuzz()
    {
        $this->fizzbuzz();
    }
}
$class = new MyClass();
// Call methods directly
$class->foo();
// This be foo, foo!
$class->bar();
// This is the bar function (Tried to call bar)
$class->baz();
// The amazing baz method. (Tried to call baz)
$class->fizzbuzz(7);
// Nothing (Tried to call fizzbuzz)
echo "Calling the call functions below:\n";
$class->callFoo();
// This be foo, foo!
$class->callBar();
// This is the bar function
$class->callBaz();
// The amazing baz method.
$class->callFizzBuzz();
// Nothing (Tried to call fizzbuzz)