DOMNode __destruct method broken?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

Another idea I had that I wanted to bounce off you guys was using a separate table for each node type, as each have slightly different needs: Like attributes always have a name/value pair while elements never have a value, but always have a name... and cdata sections never ave a name, but always a value... etc...

Seems logical to me, but I'm a little too deep in it to be completely objective
Sure, why not.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

You're getting the errors because the objects are being 'shutdown' and you are trying to reference them.

It's sometimes funny behaviour, like you are experiencing.

Have a look at using register_shutdown_function();
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

Thanks for the tip Jenk - I've removed most of my need for the destruct method at this point, but I might use register_shutdown_function() for object serialization when I get to the optimization stage.

Cheers,
Kieran
Post Reply