-
-
Save Izumi-kun/fb97504464e56cc5f621 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 | |
register_shutdown_function(function(){ new one(); }); | |
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 | |
DIED ONCE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment