Getting Parse Error during installation of Drupal 8 I am getting the following error while Installing Drupal 8.


  Parse error: parse error, expecting T_CONSTANT_ENCAPSED_STRING' or'('' in var\www\html\core\includes\bootstrap.inc on line 3


When I checked the line number 3 in index.php I saw following two lines.

use Drupal\Core\DrupalKernel;
use Symfony\Component\HttpFoundation\Request;


I don't know what is the meaning of above two lines and why these are creating the above error.
Hopefully you're not installing Drupal 8 in the hope of using it as a stable website...it's nowhere near ready yet :)

That said, the reason you're getting the error is because the PHP const keyword has only been available for use in the global scope since PHP 5.3. Drupal 8 uses const in the global scope in a lot of places (correctly, as Drupal 8 will require at least PHP 5.3).

My guess is you have PHP 5.2 or lower installed on your server.

Some helpful links:


const docs
Drupal change record for using const instead of define()
Migrating from PHP 5.2.x to PHP 5.3.x