class MethodTest { public $xy = NULL; public function __call($name, $arguments) { $arguments['dsd'] = 'mt'; return $this->xy->$fname($arguments); } } $obj = new MethodTest; $obj->runTest();
Mam pytanie dlaczego (array) jest w nawiasach zwracając tym samym NULL?
Wypluwa taki błąd:
Cytat
Notice: Array to string conversion in C:\xampp\htdocs\Untitled-2.php on line 11
Array
Fatal error: Call to a member function doRunTest() on null in C:\xampp\htdocs\Untitled-2.php on line 13
Array
Fatal error: Call to a member function doRunTest() on null in C:\xampp\htdocs\Untitled-2.php on line 13