- error_reporting: documentation ( source)
- strtolower: documentation ( source)
<?php
error_reporting(-1);
class a {
public function b(&$name, $junk) {
$name = strtolower($name).$junk;
}
}
$arguments = ['Rasmus', 'junk'];
$obj = new a;
$reflectionMethod = new ReflectionMethod('a', 'b');
$closure = $reflectionMethod->getClosure($obj);
$closure(...$arguments);
echo $arguments[0];