- implode: documentation ( source)
<?php
// http://php.net/manual/en/language.oop5.overloading.php#language.oop5.overloading.methods
class Foo
{
public function __call($name, $arguments)
{
echo "Calling object method '$name' " . implode(', ', $arguments). "\n";
}
public function bar(int $i) {
echo "bar($i)\n";
}
}
$foo = new Foo();
$foo->bar(123);
$foo->bar("abc");