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.

2 Answers 2


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:

  • 1
    Actually, it's because use is not available in 5.2 but yes, it's because 5.2.
    – user49
    Jan 9, 2013 at 13:06

Maybe you are using an unsuported version of PHP for Drupal 8. I tried on PHP 5.3 and got a similar error message.

Althou Drupal 6 runs on PHP 5.x, and 7 runs on 5.2.5, the minimun version of PHP supported for Drupal 8 is PHP 5.5.

Check the requirements here, look specifically for Drupal 8: https://www.drupal.org/requirements

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.