Skip to content

Instantly share code, notes, and snippets.

View davegardnerisme's full-sized avatar

Dave Gardner davegardnerisme

  • London, UK
View GitHub Profile
@davegardnerisme
davegardnerisme / gist:2559860
Created April 30, 2012 16:35 — forked from anonymous/gist:2559738
Worker thingy for Dave
<?php
/**
Realised my tweet was unclear: what I meant is:
1) Close of the socket and context in the child process after forking before creating the child context/socket - you need both bits so that it shuts down, else the context will wait for the socket
2) Turn off 'persistance' with a flag, else it'll take it out of the global table internal to PHP (which is kept when forking of course).
Hacked in changed below:
@davegardnerisme
davegardnerisme / gist:1234971
Created September 22, 2011 14:51 — forked from lox/gist:169617
Generic SPL class loader for PHP
<?php
/**
* Generic SPL class loader
* @license http://opensource.org/licenses/mit-license.php MIT License
* @author Lachlan Donald <lachlan@ljd.cc>
*/
class ClassLoader
{
private $_paths = array();
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.