Created
May 6, 2010 07:38
-
-
Save fivestar/391897 to your computer and use it in GitHub Desktop.
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 Hoge | |
{ | |
public function __construct() | |
{ | |
var_dump(__METHOD__); | |
register_shutdown_function(array($this, 'shutdown')); | |
} | |
public function __destruct() | |
{ | |
var_dump(__METHOD__); | |
} | |
public function shutdown() | |
{ | |
var_dump(__METHOD__); | |
} | |
} | |
class Fuga extends Hoge | |
{ | |
public function __construct() | |
{ | |
parent::__construct(); | |
var_dump(__METHOD__); | |
throw new Exception(); | |
} | |
public function __destruct() | |
{ | |
var_dump(__METHOD__); | |
parent::__destruct(); | |
} | |
} | |
$obj = new Fuga; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment