<?php class A { public function test(array $p = []) { print_r($p); return null; } } $a = new A; $b = 'test'; $a->$b([ 'firstName' => 'Nikita', 'secondName' => 'Gopkalo', ]);
You have javascript disabled. You will not be able to edit any code.