Bug #15407 Updated: The " == " op does not work

From: Date: Wed, 06 Feb 2002 21:08:43 +0000
Subject: Bug #15407 Updated: The " == " op does not work
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-79404@lists.php.net to get a copy of this message
ID: 15407 Updated by: jan@php.net -Summary: The " == " op does not work Reported By: piapoco@excite.com -Status: Open +Status: Bogus Bug Type: Variables related Operating System: Windows 2000 PHP Version: 4.1.1 New Comment: = is no comparison operator but an assignment operator. since a $var = "bla" is not very error prone of course it "works" but that is logically not what you want. additionally the == operator on arrays is not veryhelpful. I suggest, you read the manual sections about "Assignments", "Comparision", "Arrays" and "Array Functions". No bug -> bogus Previous Comments: ------------------------------------------------------------------------ [2002-02-06 16:00:13] piapoco@excite.com I'm using Apache and IIS 5. When I use the comparison operator ( == ), my code fails. But when I use a single ( = ), it goes fine. I'm using the plain config that comes with Apache and PHP, but added a line to have .incs treated in the server. This is the lame code: if ($myrow == mysql_fetch_array($Recset)) { $gIDClient = $HTTP_POST_VARS["IDClient"]; } The assigment never gets touched and no error messages are issued. Weird, ain't it? Thanks. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15407&edit=1

« previous php.dev (#79404) next »