Created
November 11, 2010 16:21
-
-
Save wowo/672716 to your computer and use it in GitHub Desktop.
Weirdest PHP construction I've ever seen. From http://blog.sznapka.pl/weirdest-php-construction-ive-ever-seen/
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 | |
class myClass | |
{ | |
public function myPublicMethod() | |
{ | |
function uglyFunction() | |
{ | |
echo "le fu-"; | |
} | |
} | |
} | |
$myObject = new myClass(); | |
$myObject->myPublicMethod().uglyFunction(); // prints "le fu-" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment