Re: Destructor not called when extending SimpleXMLElement
| From: | Erwin Poeze | Date: | Mon, 02 Jul 2012 12:55:16 +0000 |
| Subject: | Re: Destructor not called when extending SimpleXMLElement | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-318362@lists.php.net to get a copy of this message | ||
Interesting problem. I would expect it to work too. I assume it is a bug.
2012/7/2 Nick Chalk <nick@loadbalancer.org>
> Afternoon all.
>
> I seem to be having a little trouble with extending the
> SimpleXMLElement class. I would like to add a destructor to the
> subclass, but am finding that it is not called.
>
> Attached is a minimal demonstration of the problem. The XMLConfig
> class extends SimpleXMLElement, and its destructor is not called. The
> XMLConfig2 class, which does not use inheritance, does have its
> destructor called.
>
> The test platform is CentOS 6.2, with PHP version 5.3.3.
>
> What am I missing?
>
> Thanks for your help.
> Nick.
>
> --
> Nick Chalk.
>
> Loadbalancer.org Ltd.
> Phone: +44 (0)870 443 8779
> http://www.loadbalancer.org/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>