I'm getting the following error:
Parse error: syntax error, unexpected '.', expecting ',' or ';' in xxx
on line 19
On this line:
public $metad_name = "lol" . "lol";
Answer
This error is saying that an expression can't be used in class properties:
Works
class Foo {
public $metad_name = '';
function __construct() {
$this->metad_name = 'lol' . 'lol';
}
}
Parse error
class Bar {
public $metad_name = 'lol' . 'lol';
}
If your code isn't a class property - just delete the public
No comments:
Post a Comment