Skip to content

Instantly share code, notes, and snippets.

View igorgolovanov's full-sized avatar

Igor Golovanov igorgolovanov

View GitHub Profile
@igorgolovanov
igorgolovanov / oo.php
Created February 17, 2012 16:31 — forked from dhotson/oo.php
PHP Object Oriented Programming Reinvented (for PHP 5.4)
<?php
// Define the 'class' class
$class = (new Obj)
->fn('new', function() {
$newClass = (new Obj($this->methods))
->fn('new', function() {
$obj = new Obj($this->imethods);
call_user_func_array(array($obj, 'init'), func_get_args());
return $obj;