Last active
December 11, 2015 22:18
-
-
Save Cifro/4668050 to your computer and use it in GitHub Desktop.
Funception in PHP II. - We need go deeper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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