Hi Lester,
>> Its a defacto standard. Of course there is nothing stopping PHP from >> implementing properties that way, but by going against the standard set >> by >> the rest of the industry, it is very confusing for programmers coming >> from >> other languages to learn PHP. A good example is how "==" works >> differently in PHP than in other languages. In PHP, "===" works like >> "==" >> does everywhere else. "(string)'0' == (int)0", for example is true in >> PHP, but false in most other languages. I have had countless >> conversations with PHP developers who claim the language is "broken", >> because == does not work like they expect it to, after which I have to >> explain === to them. This is because PHP goes against the defacto >> standard. Maybe it would have been better if == and === had the >> opposite >> meaning, as to not squash the standard? > > You have got me there. > = is assign > == is equal value > === is equal type and value > > At least on all the languages I've been using recently ... where is this a > problem? In any language that does not have === it is like this: = is assign == is equal type and value That is where the confusion comes from. People do not expect "0" and 0 to be equal, because they are different types. - Dennis -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php