Created
September 1, 2013 15:50
-
-
Save ScreamingDev/6405307 to your computer and use it in GitHub Desktop.
You never find the real problem
This file contains hidden or 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 EventHandler { | |
| public static function preString() { | |
| // imagine: echo (new Unknown()); | |
| throw new Exception('something went wrong'); | |
| } | |
| } | |
| class OhSnap { | |
| function __construct() { | |
| } | |
| function __toString() { | |
| EventHandler::preString(); | |
| } | |
| } | |
| $damn = new OhSnap(); | |
| try { | |
| echo $damn; | |
| } catch (Exception $e) { | |
| echo "Well, you never get here."; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment