class Foo {
    
    public function __call($function, $arguments)
    {
        return "$function has been called with arguments: " . implode(', ', $arguments); 
    }
    
    // public function fireFunction($one, $two, $three) {
    //     return "pre-defined method";
    // }
}
$foo = new Foo();
echo $foo->fireFunction(5, 47, "third argument");
__call
is invoked when the method is inaccessible (when it's not public or does not exist at all)
by Valeri Tandilashvili
5 years ago
PHP
OOP
PHP Object Oriented Programming (OOP)
3
Pro tip: use ```triple backticks around text``` to write in code fences