I am facing these errors while accessing Magento folder from XAMPP (localhost/magento):
Fatal error: Uncaught Error: Function name must be a string in C
Your solution
Fatal error: Uncaught Error: Function name must be a string in ... app\code\core\Mage\Core\Model\Layout.php:555 ...
This error was easy to fix because the problem was in the following line:
$out .= $this->getBlock($callback[0])->$callback[1]();
Instead it should be:
$out .= $this->getBlock($callback[0])->{$callback[1]}();
find your detail solution here on below given link http://www.code007.ro/making-work-magento-with-php-7-rc1/
Go to app\code\core\Mage\Core\Model\Layout.php line no 555 and
change $callback[1] to {$callback[1]}
Its due to PHP7
It's not recommended to edit the core file. We will override it.
Copy this file app/code/core/Mage/Core/Model/Layout.php
into app/code/local/Mage/Core/Model/Layout.php
Change code in app/code/local/Mage/Core/Model/Layout.php
file (line # 555)
$out .= $this->getBlock($callback[0])->$callback[1]();
To:
$out .= $this->getBlock($callback[0])->{$callback[1]}();
Changed the line 555 to:
$out .= $this->getBlock($callback[0])->{$callback[1]}();
It works. But one thing I'm not sure of if this is really a php7. I'm running this on my website with same files and configurations on the same server and it's working with no issues without changing that line.
it is a php7 issue since when i upgraded from 5.6 to 7.0 i got this error. to fixe it i edited core file (hope a patch will come soon) either like mentionned in other ansewers before or like below:
Go to app\code\core\Mage\Core\Model\Layout.php line no 555
$method = $callback[1];
$out .= $this->getBlock($callback[0])->$method();