Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Saif Eddin Gmati azjezz

🎯
Focusing
View GitHub Profile
View structs.php
<?php
declare(strict_types=1);
namespace App;
struct User {
string $identifier;
}
View main.php
<?php
declare(strict_types=1);
use Psl\Async;
use Psl\IO;
require 'vendor/autoload.php';
function fetch(string $id): string {
View results.md

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
View contexts.php
<?php
/**
* @context={}
*/
function foo(): void {}
/**
* @context={io}
View keybase.md

Keybase proof

I hereby claim:

  • I am azjezz on github.
  • I am azjezz (https://keybase.io/azjezz) on keybase.
  • I have a public key ASBG6C6v-7GwW-PBxKqaBF601YuVYZV1TN41DucA7xNz1Qo

To claim this, I am signing this object:

@azjezz
azjezz / Logger.hack
Created May 22, 2020
Nuxed basic console logger implementation
View Logger.hack
namespace Nuxed\Console\Log;
use namespace HH\Lib\Str;
use namespace Nuxed\Console;
use namespace Nuxed\Console\Output;
use namespace Nuxed\Contract\Log;
final class Logger implements Log\ILogger {
public function __construct(private Output\IOutput $output) {}
@azjezz
azjezz / better-app.php
Last active Dec 11, 2019
Improve the performance of your PHP 7.4 application
View better-app.php
<?php
declare(strict_types=1);
namespace BetterApplication;
use FFI;
use Closure;
abstract class AbstractZendWriter
@azjezz
azjezz / brainfuck.php
Last active Nov 15, 2019
Brainfuck Lexer and Interpreter written in PHP ( https://3v4l.org/9lEte )
View brainfuck.php
<?php
declare(strict_types=1);
namespace AzJezz\BrainFuck;
use ArrayIterator;
use Iterator;
use RuntimeException;
@azjezz
azjezz / .hax.json
Last active Nov 8, 2019
Hax configuration
View .hax.json
{
"name": "My Application",
"base-path": "app/",
"entry": "app/bin/application.hack",
"compression-algorithm": "gzip",
"signing-algorithm": "sha512",
"include": [
"app/src/*",
"app/vendor/*"
],
View connect.js
function user(uuid) {
let headers = new Headers({
'Accept': 'application/json'
})
let request = new Request('https://connect.symfony.com/api/users/' + uuid, {
method: 'GET',
headers: headers,
mode: 'cors',
cache: 'default'