Reply to Is PHP mature?

Your name:

Reply:


Posted by denisbytezone on 03/01/07 02:28

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?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация