Skip to content

Instantly share code, notes, and snippets.

@Cifro
Last active December 11, 2015 22:18
Show Gist options
  • Save Cifro/4668050 to your computer and use it in GitHub Desktop.
Save Cifro/4668050 to your computer and use it in GitHub Desktop.
Funception in PHP II. - We need go deeper
<?php
/**
* Funception in PHP II.
*/
function We(){
class need{
function need(){
$o = (object) null;
$o->go = function(){
function deeper(){
echo "We need go deeper";
}
deeper();
};
return $o;
}
}
return new need;
}
$deeper = We()->need()->go;
$deeper();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment