0

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/a0/public_html/index.php on line 17

Parse error: syntax error, unexpected T_STRING in /home/a0/public_html/index.php on line 17

Why these errors are shown?

<?php

define('IS_DEMO', (gethostname() === 'youtubify' ? 1 : 0));
define('VERSION', 1.5);

require __DIR__.'/application/bootstrap/autoload.php';
$app = require_once __DIR__.'/application/bootstrap/app.php';

$kernel = $app->make('Illuminate\Contracts\Http\Kernel');
$response = $kernel->handle{
    $request = Illuminate\Http\Request::capture() // line 17
};
$response->send();

$kernel->terminate($request, $response);
?>
Berriel
  • 12,659
  • 4
  • 43
  • 67

1 Answers1

2

You are using namespaces, which were introduced in PHP 5.3.0. PHP 5.2 does not support them.

http://php.net/manual/en/language.namespaces.rationale.php

I do not know if there is a way to backport namespace-support to PHP 5.2.* and I guess if there is, it is several times harder and more experimental than updating your PHP-installation.

Franz Gleichmann
  • 3,420
  • 4
  • 20
  • 30