Created
October 30, 2015 01:38
-
-
Save sanmai/6f75d3947941b7bea773 to your computer and use it in GitHub Desktop.
If you want to die more than once
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 one | |
{ | |
public function __construct() | |
{ | |
die("DIED ONCE\n"); | |
} | |
} | |
class two | |
{ | |
public function __destruct() | |
{ | |
new one(); | |
} | |
} | |
$two = new two(); | |
new one(); |
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
DIED ONCE | |
DIED ONCE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment