You are here: Re: I hate this language :-D « All PHP « IT news, forums, messages
Re: I hate this language :-D

Posted by Dennis de Wit on 08/21/06 11:24

>
> while ('Z' != $a) {
> $a++;
> print $a;
> }
>
> Note that this only works for a-z & A-Z; if you try it on, say, '@', the
> value will remain unchanged.
>
> FYI, Perl behaves the same with the a-z & A-Z ranges, but returns 1 for the
> $a++ operation with other characters.
>
>
> JW
>
>

I do understand the fact that it has this kind of behaviour. I just find
it unpredictable. Just as unpredictable as the following statements

(''=='0') returns true
while
('a'='1') does not return true
but
(true=='a') returns true

It doesn't form a problem, as long as you can predict what happens on
different codes.

Same here: When having REGISTER_GLOBALS set to ON (don't ask me why, but
people still use this feature, which I'd call a BUG), the variable
$_SESSION['id'] points to the same memory location as $id. So if you
change $id codewise, the value of $_SESSION['id'] will also change.

These things can drive me mad! I do understand why they happen, I do
understand why these problems remain in the php language and I do
realize I have to get over it. But it still costs me loads of time
because I always produce errors with this behaviour :(

Dennis

 

Navigation:

[Reply to this 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

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