I've run into this before.. essentially, you can't do that ;)

http://us2.php.net/language.oop5.decon (second note)

Nor, can you throw exceptions anytime after the engine starts shutting down.

-ralph

Jakob Buchgraber wrote:
Okay, I can now reproduce the problem. Here is the code:
<?php
class Foo {
    public function __destruct() {
        throw new Exception();
    }
}

$a = new Foo();
?>

I couldn't reproduce it before as I didn't assign the instance of Foo to a variable, however Christian Hoffmann pointed me out that I need to do this in order to get the desired error.

- Jakob


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to