Skip to content

Instantly share code, notes, and snippets.

View azjezz's full-sized avatar
😶

Saif Eddin Gmati azjezz

😶
View GitHub Profile
<?php
/**
* @context={}
*/
function foo(): void {}
/**
* @context={io}

uncached

This benchmark runs with cache disabled for all of Symfony, Fastroute, and HackRouting.

The (matcher/dispatcher/resolver) is being created in each iteration from scratch.

Ranking:

  1. FastRoute
  2. Symfony
  3. HackRouting
@azjezz
azjezz / main.php
Last active December 30, 2021 15:27
<?php
declare(strict_types=1);
use Psl\Async;
use Psl\IO;
require 'vendor/autoload.php';
function fetch(string $id): string {
<?php
declare(strict_types=1);
namespace App;
struct User {
string $identifier;
}
@azjezz
azjezz / 0.php
Last active December 12, 2022 15:35
<?php
declare(strict_types=1);
namespace App;
enum ArticleStatus {
case Published;
case Draft;
case Archived;