You are here: Re: TRUE and FALSE are treated differently « PHP Programming Language « IT news, forums, messages
Re: TRUE and FALSE are treated differently

Posted by Ivαn Sαnchez Ortega on 01/06/08 23:12

A Bit Narked wrote:

> Well, thanks to all for your responses. The php developers get
> 2 marks out of 10 for this, in my book. Arbitrary choices should
> fit *with* people's expectations, not go against them.

Then prove yourself better than them and write a PHP compiler that fits
people's expectations, whatever those are.


> The whole idea of symbolic constants is that they are always
> replaced by the underlying value during translation

You mean in the lexical analysis. Right. But remember that this is PHP, not
C. When you write the constant "true", it gets replaced by a constant of
boolean type, not a constant of integer type. So, PHP is doing it right.
Sorry to dissapoint you here.


I'm going to say it again, just to make sure there are no misunderstandings:

In PHP, a boolean is different than an integer. Get over it.


(BTW, I'm just curious about what is this book you are following there)

Cheers,
--
----------------------------------
IvΓ‘n SΓ‘nchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

All I know is what the words know, and dead things, and that
makes a handsome little sum, with a beginning and a middle and
an end, as in the well-built phrase and the long sonata of the dead.
-- Samuel Beckett

 

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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация