FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Operator precedence
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Object constructors/destructors [message #185121 is a reply to message #185118] Thu, 27 February 2014 13:25 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 2/26/2014 11:49 PM, Richard Damon wrote:
> On 2/26/14, 8:44 AM, Jerry Stuckle wrote:
>> On 2/26/2014 7:50 AM, Richard Damon wrote:
>>>
>>> An the "name" of the Deserializing constructor in PHP is __wakeup().
>>>
>>> You also do NOT get two destructor calls on the same object, the
>>> deserializing created a new object.
>>>
>>
>> __wakeup() is not a constructor - and does not do the same thing.
>>
>
> What makes it NOT a constructor? IT seems to be exactly the thing that
> does what you say must be done to make the new object via unserialization.
>

If you want to consider __wakeup() to be a constructor, then you must
consider __sleep() to be a destructor. In that case, PHP is also wrong
because if an object is serialized, it will call both __sleep() and the
destructor. This would be two calls to destructors for the same object.

--
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex(at)attglobal(dot)net
==================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Correlating curl resources to some other object.
Next Topic: Experienced Web designer required
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 05:34:53 GMT 2024

Total time taken to generate the page: 0.04036 seconds