|
Posted by 469 on 03/01/07 03:36
On Feb 28, 10:28 pm, denisbytez...@gmail.com wrote:
> I've hit two problems recently that strike me as major issues.
> Firstly, if you compare two objects for equality, and there is some
> recursion involved internal to the object's structure, then PHP gives
> an error.
>
> Consider this:
>
> $blob1 = new Blob ();
> $blob2 = new Blob ();
>
> $blob1->child = $blob2;
> $blob2->child = $blob1;
>
> $blob1 === $blob2 ? print 'equal' : print 'not equal'; // works
> $blob1 == $blob2 ? print 'equal' : print 'not equal'; // fails
>
> Class Blob
> {
> public $child;
>
> }
>
> I reported this as a bug, and was told "that's how PHP works - not a
> bug"
>
> Secondly, today I find out that using session_start() is a good way to
> pass objects from web page to page, UNLESS they use SimpleXML. As they
> say, WTF?
>
> I've found that this was also reported as a bug (by someone else), and
> they received the same response. I find it very difficult to continue
> with this language, not knowing what weirdo error is going to crop up
> next and then to be told "It's supposed to do that"
>
> Is there a workaround to the second problem? How does one share
> objects between pages when using SimpleXML?
simpleXML = XML dude... <.< serialize your object... pass it to the
XML... then load it back in the other page... its like serializing
objects (SDave_sessions) in a database... and the let the user reload
his/her session <.< i dont practically and see any functionality about
passing an object via XML... when there are easier ways.. and also
faster...
Navigation:
[Reply to this message]
|