Flight is a fast, simple, extensible framework for PHP. It is quite versatile and can be used for building any kind of web application. It is built with simplicity in mind and is written in a way that is easy to understand and use.
Flight is a great beginner framework for those who are new to PHP and want to learn how to build web applications. It is also a great framework for experienced developers who want more control over their web applications. It is engineered to easily build a RESTful API, a simple web application, or a complex web application.
<?php // if installed with composer require 'vendor/autoload.php'; // or if installed manually by zip file // require 'flight/Flight.php'; Flight::route('/', function() { echo 'hello world!'; }); Flight::route('/json', function() { Flight::json(['hello' => 'world']); }); Flight::start();
Simple enough right? Learn more about Flight in the documentation!
There is an example app that can help you get started with the Flight Framework. Go to flightphp/skeleton for instructions on how to get started! You can also visit the examples page for inspiration on some of the things you can do with Flight.
We're on Matrix Chat with us at #flight-php-framework:matrix.org.
There are two ways you can contribute to Flight:
Flight requires PHP 7.4 or greater.
Note: PHP 7.4 is supported because at the current time of writing (2024) PHP 7.4 is the default version for some LTS Linux distributions. Forcing a move to PHP >8 would cause a lot of heartburn for those users. The framework also supports PHP >8.
Flight is released under the MIT license.