Created
May 8, 2014 17:35
-
-
Save ircmaxell/f38a784a66740ae9d91b to your computer and use it in GitHub Desktop.
PHP Is Drunk
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 a { | |
const a = b::c; | |
const b = b::d; | |
} |
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 b { | |
const c = a::b; | |
const d = 1; | |
} |
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 | |
spl_autoload_register(function($class) { | |
require_once __DIR__ . "/" . strtolower($class) . ".php"; | |
}); | |
var_dump(A::a, A::b, B::c, B::d); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BTW, that outputs: