Skip to content

Instantly share code, notes, and snippets.

View lisachenko's full-sized avatar

Alexander Lisachenko lisachenko

View GitHub Profile
@lisachenko
lisachenko / chat.php
Created March 7, 2013 07:45
Stomp console chat client
<?php
$author = trim(`whoami`);
$pid = pcntl_fork();
if ($pid === 0) {
// Child process here
$stomp = new Stomp();
$stomp->subscribe('/topic/Chat');
while (true) {
$frame = $stomp->readFrame();
@lisachenko
lisachenko / SplClassLoader.php
Created November 3, 2011 06:13 — forked from jwage/SplClassLoader.php
PSR-0 SplClassLoader
<?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.