Created
May 15, 2013 14:47
-
-
Save hirak/5584538 to your computer and use it in GitHub Desktop.
__toString()でExceptionが発生すると死ぬ ref: http://qiita.com/items/195222c4f4f223e435fa
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 Hoge { | |
function __toString() { | |
throw new Exception; | |
} | |
} | |
try { | |
$hoge = new Hoge; | |
echo $hoge; | |
} catch (Exception $e) { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment