Probably the fastest PHP framework – Lumen

Introduction

Lumen was created in 2015 by Taylor Otwell who is also the creator of the Laravel framework. It is an open-source, ultra-light framework designed mainly for writing microservices in PHP. Lumen is a micro-framework , it means that it is a slimmed-down, fast version of a full-fledged framework for writing web applications, in this case it is the younger brother of the Laravel framework.

The main determinant of the quality of such a project is its speed, and it falls out well against the competition.

Advantages

Taking into account the benchmark shown on the Lumen website, it is currently the fastest micro-framework among the competition in the number of requests per second.

  • Lumen – 1,900 requests per second
  • Slim 3 – 1800 requests per second
  • Silex – 1,300 requests per second

Here are some of the advantages of the Lumen framework:

  • Incredible speed
  • Simple syntax
  • Very easy migration of the project to the full-fledged Laravel framework
  • Lumen provides a fast routing function thanks to the Fast Route library. This library provides implementation of routing based on regular expressions.
  • It provides a simple observer that allows you to save and listen to events in our application.
  • Unfortunately, Lumen does not support the session, but provides a simple authentication mechanism based on tokens.
  • He supports caching. There is no difference between the Laravel and Lumenie cache systems, all caching drivers such as databases, Memcached and Redis are supported.
  • It contains the Monologue library, which provides support for many ways of logging.

Requirements

Server requirements:

  • PHP> = 7.1.3
  • OpenSSL PHP extension
  • PDO PHP extension
  • Mbstring PHP extension
  • Installation using Composer – the project can be installed by entering the Composera create-project command in the terminal.

Installation

Using Composer project can be installed by entering the composer command:

To set up the project locally, you can use external virtual machines, or use the built-in production server. This can be done by entering the appropriate command in the terminal.

All options for Lumen settings are stored in a .env file, after installing the project you need to configure the local environment.

Sign up for our newsletter

Join our mailing list and don't miss any posts and news from the tech world!