<?php class Increment { function __invoke($x) { ++$x->num; } } $c = new Increment(); $a = new \stdClass(); $a->num = 5; call_user_func_array([$c], [$a]); var_dump($a);
You have javascript disabled. You will not be able to edit any code.