Ejemplo n.º 1
0
<?php

class Call
{
    public static function staticfunc($msg)
    {
        echo "Called a static function!", $msg !== null ? " Probably from an object, with msg: " . $msg : "";
    }
    public function __call($method, $arguments)
    {
        return call_user_func_array([$this, $method], $arguments);
    }
    public function normalFunc()
    {
        echo "Normal";
    }
}
$call = new Call();
$call->staticfunc("This is my message of d00m!");
Call::normalFunc();