flightphp / core

An extensible micro-framework for PHP
https://docs.flightphp.com
MIT License
2.62k stars 409 forks source link

unexpected 'Engine' #463

Closed JapCLoN closed 2 years ago

JapCLoN commented 2 years ago

Hello,

I'm trying to install flightphp to create an API endpoint, however when I try to access the page it gives me error 500 and the log says this: PHP Parse error: syntax error, unexpected 'Engine' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) in /var/www/html/list/flight/Flight.php on line 68

I am currently on:

PHP 7.3.31-1~deb10u1 (cli) (built: Oct 24 2021 15:18:08) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.31, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.31-1~deb10u1, Copyright (c) 1999-2018, by Zend Technologies

I've used flightphp many times, but never had this issue

JapCLoN commented 2 years ago

Line 68 is: private static Engine $engine;

JapCLoN commented 2 years ago

Using the example index file btw.

JapCLoN commented 2 years ago

Just read the readme on github and it requires php 7.4 and I am on a lower on, however https://flightphp.com/ says 5.3, maybe update that @mikecao