I come across this strange behavior of PHP, assigning string:
class a {
public $str = "a" . 'b';
}
$obj = new a();
echo $obj->str;
never works, throws following error:
PHP Parse error: syntax error, unexpected '.', expecting ',' or ';' in /var/www/test.php on line 2
while using as plain PHP it works:
$str = "a" . 'b';