note 76171 deleted from language.operators.comparison by ronabop

From: Date: Tue, 03 Jul 2007 21:07:46 +0000
Subject: note 76171 deleted from language.operators.comparison by ronabop
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-128201@lists.php.net to get a copy of this message
Note Submitter: rofthorax at gmail dot com Reason: useless ---- I'm sure others have found this out, but there is no excuse for it: $a = "woiejiowjef"; $b = 0; print ($a == $b); // results in 1 print ("$a" == "$b"); // results in 0 When did PHP get to be strongly typed? And if you think going to an object oriented system is going to save face. I have news for you, what is operator overloading anyhow? It's polymorphism by the purest sense.. Why then does php make such a terrible error? It's like we are back using C, comparing a string pointer to a integer. If addressing in relative, a string pointing to address 0 is equivalent to the number 0. But perceptively, this is wrong because we don't have access (or are not supposed to have access) to pointers.

« previous php.notes (#128201) next »