phpdoctor icon indicating copy to clipboard operation
phpdoctor copied to clipboard

Unexpected 'new' (T_NEW) in /var/www/html/phpdoctor/classes/phpDoctor.php on line 561

Open jamjar919 opened this issue 8 years ago • 3 comments

PHP Parse error: syntax error, unexpected 'new' (T_NEW) in /var/www/html/phpdoctor/classes/phpDoctor.php on line 561

Relevant lines reads:

$rootDoc =& new rootDoc($this);

New clone from Github repo on Ubuntu 16.04.

jamjar919 avatar Apr 20 '17 20:04 jamjar919

Running PHP version 7.0.15-0ubuntu0.16.04.4

jamjar919 avatar Apr 20 '17 20:04 jamjar919

Looking at the docs in Migrating from PHP 5.6.x to PHP 7.0.x, It appears this is a PHP 7 issue - Under the section 'New objects cannot be assigned by reference', the line $c =& new C; is added as example of invalid code.

jamjar919 avatar Apr 20 '17 20:04 jamjar919

Blindly tried to fix in https://github.com/jamjar919/phpdoctor but produces duplicate output.

jamjar919 avatar Apr 20 '17 20:04 jamjar919