I just installed Laravel 4 (Illuminate) and as I opened the index.php file in a browser, I was met with this error:
Parse error: syntax error, unexpected 'yield' (T_YIELD), expecting identifier (T_STRING) in /www/Laravel4/vendor/illuminate/view/src/Illuminate/View/Environment.php on line 339
I have fixed the permissions for the meta folder, and installed all the dependencies through Composer. I am running PHP version 5.5.0alpha2 on OSX 10.8.2.
That's because yield
became a language construct in PHP 5.5 (used in Generators) - but someone decided that it's a good idea to use this short word to name a function:
public function yield($section)
{
return isset($this->sections[$section]) ? $this->sections[$section] : '';
}
Downgrade to PHP 5.4 (after all, it's the current mainstream version, 5.5 is not even in beta yet) and it should work fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With