Skip to content

Instantly share code, notes, and snippets.

View YannDoy's full-sized avatar

Yann Doy YannDoy

  • BFH
  • Tramelan, Swiss
View GitHub Profile
@xeoncross
xeoncross / registry.php
Created November 3, 2014 19:59
A simple singleton registry store inside an function that provides public read/write access to it's datastore
<?php
function o($key = null, $value = null) {
static $registry;
if( ! $key) {
return $registry;
}
@jm42
jm42 / 140.md
Last active December 24, 2019 14:54
140 bytes of PHP code

140 bytes

  • Framework

    • Twitto - A web framework in a tweet.
    • Kernel - A kernel in a tweet.
    • sized140 - Something like a framework in PHP with 6 components of 140 chars.
  • Router

  • mu - A tweet-sized PHP micro-router.
@mathiasverraes
mathiasverraes / TestFrameworkInATweet.php
Last active May 23, 2022 12:28
A unit testing framework in a tweet.
<?php
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}