Normally i wouldn't post syntax errors here, but this case is a bit suspicious to me. I was trying to put together a constant with a string. I works fine on localhost, but when i push my project on my web server, it tells me:
Parse error: syntax error, unexpected '.', expecting ',' or ';' in xxx on line xxx
Code:
define("ROOT", str_replace("index.php", "", $_SERVER["SCRIPT_FILENAME"]));
and
$somePath = ROOT . "some/path"; //Synax error in this line
Has this something to do with different PHP versions? (5.5 on webserver, 7.0 localhost)
Update
Some updates in the code:
class SomeClass {
private $somePath = ROOT . "some/path"; //Synax error in this line
...
}