Benchmarks: Methodology

To insure symmetry of setup, each framework was installed in its own subfolder of web root named by framework and bound to an equivalent host name through an equivalent virtual host:

Framework Installation Folder Hostname VirtualHost
Lucinda /var/www/html/lucinda www.lucinda.local /etc/apache2/sites-available/lucinda.conf
Laravel /var/www/html/laravel www.laravel.local /etc/apache2/sites-available/laravel.conf
Symfony /var/www/html/symfony www.symfony.local /etc/apache2/sites-available/symfony.conf
CodeIgniter /var/www/html/codeigniter www.codeigniter.local /etc/apache2/sites-available/codeigniter.conf

Installation Methodology

Installation strictly followed factory settings recommended in respective framework documentation:

Framework Console Steps
Lucinda composer create-project lucinda/framework lucinda
Laravel composer create-project laravel/laravel laravel cd laravel chmod 777 storage/logs chmod 777 storage/framework/sessions chmod 777 storage/framework/views
Symfony composer create-project symfony/skeleton symfony cd symfony composer require symfony/twig-bundle
CodeIgniter composer create-project codeigniter4/appstarter codeigniter cd codeigniter chmod 777 writable/cache

Virtual Hosts Configuration

Virtual hosts were configured to insure identical settings are used, unless differences are required:

Framework VirtualHost
Lucinda <VirtualHost *:80> ServerName www.lucinda.local DocumentRoot /var/www/html/lucinda DirectoryIndex /index.php <Directory /var/www/html/lucinda> AllowOverride None Order Allow,Deny Allow from All FallbackResource /index.php </Directory> SetEnv ENVIRONMENT local </VirtualHost>
Laravel <VirtualHost *:80> ServerName www.laravel.local DocumentRoot /var/www/html/laravel/public DirectoryIndex /index.php <Directory /var/www/html/laravel/public> AllowOverride None Order Allow,Deny Allow from All FallbackResource /index.php </Directory> </VirtualHost>
Symfony <VirtualHost *:80> ServerName www.symfony.local DocumentRoot /var/www/html/symfony/public DirectoryIndex /index.php <Directory /var/www/html/symfony/public> AllowOverride None Order Allow,Deny Allow from All FallbackResource /index.php </Directory> </VirtualHost>
CodeIgniter <VirtualHost *:80> ServerName www.codeigniter.local DocumentRoot /var/www/html/codeigniter/public DirectoryIndex /index.php <Directory /var/www/html/codeigniter/public> AllowOverride None Order Allow,Deny Allow from All FallbackResource /index.php </Directory> </VirtualHost>

Routing Implementation

Routing was performed symmetrically as below within respective project folder:

Framework File Additions
Lucinda stdout.xml <route url="test/html" controller="TestController" view="test"/> <route url="test/json" controller="TestController" format="json"/>
Laravel routes/web.php Route::get("/test/html", "TestController@html"); Route::get("/test/json", "TestController@json");
Symfony config/routes.yaml test_html: path: /test/html controller: App\Controller\TestController::htmlAction test_json: path: /test/json controller: App\Controller\TestController::jsonAction
CodeIgniter app/Config/Routes.php $routes->get("/test/html", 'TestController::html'); $routes->get("/test/json", 'TestController::json');

Controllers Implementation

Controllers were defined as below within respective project folder:

Framework File Code
Lucinda application/controllers/TestController.php class TestController extends Lucinda\STDOUT\Controller { public function run(): void { $this->response->view()["test"] = "me"; } }
Laravel app/Http/Controllers/TestController.php namespace App\Http\Controllers; class TestController extends Controller { public function html() { return view('test', ["test"=>"me"]); } public function json() { return response()->json([ "status"=>"ok", "body"=> [ "test"=>"me" ] ]); } }
Symfony src/Controller/TestController.php namespace App\Controller; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; class TestController extends AbstractController { public function htmlAction() { return $this->render('test.html.twig', [ 'test' => "me" ]); } public function jsonAction() { return $this->json([ "status"=>"ok", "body"=> [ "test"=>"me" ] ]); } }
CodeIgniter app/Controllers/TestController.php namespace App\Controllers; class TestController extends BaseController { public function html() { return view('test', ["test"=>"me"]); } public function json() { return $this->response->setJSON([ "status"=>"ok", "body"=> [ "test"=>"me" ] ]); } }

Views Implementation

Templating was performed as below within respective project folder:

Framework File Code
Lucinda application/views/test.html Test: ${data.test}
Laravel resources/views/test.blade.php Test: {{ $test }}
Symfony templates/test.html.twig Test: {{test}}
CodeIgniter app/Views/test.php Test: <?= $test; ?>

As one can see above, CodeIgniter has no templating and uses old style PHP instead!

×