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

Home » Imported messages » comp.lang.php » out of sheer curiosity...
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: out of sheer curiosity... [message #177596 is a reply to message #177580] Tue, 10 April 2012 16:20 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 4/10/2012 8:22 AM, Leonardo Azpurua wrote:
> "Jerry Stuckle"<jstucklex(at)attglobal(dot)net> escribió en el mensaje
> news:jm17o8$ngo$2(at)dont-email(dot)me...
>> On 4/10/2012 6:48 AM, Thomas Mlynarczyk wrote:
>>> Jerry Stuckle schrieb:
>>>> >> True, this seems to be the most common use case: Make the object
>>>> >> persist
>>>> >> between different HTTP requests.
>>>>
>>>> Scotty, please see my reply to Thomas. Only the state persists between
>>>> requests. The behavior doesn't. This is a huge difference.
>>>
>>> Behaviour persists as long as you don't modify your script. The
>>> behaviour is defined in the class and each instance uses that very same
>>> behaviour.
>>>
>>> Greetings,
>>> Thomas
>>>
>>
>> No, a serialized object (or an object stored in a database) has only
>> state. The behavior doesn't exist until you create a new object from that
>> state.
>>
>> A huge difference - and one real OO languages understand and handle.
>
> Hi,
>
> Behaviour is defined by the code within the class.
>
> State is (shallowly) preserved by serialization.
>
> It is the environment (a third factor that has to be taken into account)
> what *may* be lost.
>
> __wakeup should inspect the environment and ensure that all requirements are
> met.
>
> And, by the definition, __wakeup is a special case of constructor.
>
> There is no need to get dogmatic about terms.
>
> --
>
>

If you want to call __wakeup() a constructor, then you need to call
__sleep() a destructor. You can't have it both ways.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
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
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: 5.4 windows installer.
Next Topic: Does PHP5 treat $_SERVER['PHP_AUTH_USER']) differently?
Goto Forum:
  

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

Current Time: Fri Nov 22 20:05:24 GMT 2024

Total time taken to generate the page: 0.04293 seconds