REST API

This benchmark respresent a REST API application.
It contains 500 routes, 15,000 translations and return 100 PHP objects serialized in JSON.
An event is triggered to randomly define language and benchmark event dispatcher.
No database access is made, to not influence the results.

Call GET
Routes 500 configured, 1 used (the first one). Example
Langue Random between fr_FR, en_GB and aa_BB (to use fallback system to en language).
Will be defined by an event triggered before serialization.
Example
Translations 5,000 configured by language (15,000 in total).
100 translation keys will be translated by serialization.
Example
Data 100 objects: 20 User, 40 Comment and 40 CommentType.
Properties serialization: 100 integers, 200 strings and 20 \DateTime objects.
Objects are already created, they do not come from database.
Serialized data
Response JSON serialization of 100 objets (7,021 characters). Example

PHP

#1 PHP 8.0 0.6 ms
37,627
#2 PHP 7.3 0.7 ms
37,477
#3 PHP 7.4 0.6 ms
36,113
#4 PHP 7.0 0.7 ms
34,010
#5 PHP 7.2 0.9 ms
32,310

Frameworks

#1 Yii 2.0 13 ms
2,540
#2 Zend Framework 3.0 12.7 ms
2,076
#3 CakePHP 3.7 40.4 ms
892