#21979 [NEW]: mistake of operator "if"

From: Date: Fri, 31 Jan 2003 12:36:42 +0000
Subject: #21979 [NEW]: mistake of operator "if"
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-31755@lists.php.net to get a copy of this message
From: alex_pidodny@hotmail.com Operating system: windows 2000 PHP version: 4.3.0 PHP Bug Type: Scripting Engine problem Bug description: mistake of operator "if" can't work a script $r=0; if ($r=1) {$a=1;} //comparison on equal else {$a=0;} print "Result=$a"; i see always "Result=1" but can work a script $r=0; if ($r==1) {$a=1;} //comparison on identical else {$a=0;} print "Result=$a"; i did see manual of PHP what must work both ways -- Edit bug report at http://bugs.php.net/?id=21979&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=21979&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=21979&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=21979&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=21979&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=21979&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=21979&r=support Expected behavior: http://bugs.php.net/fix.php?id=21979&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=21979&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=21979&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=21979&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21979&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=21979&r=dst IIS Stability: http://bugs.php.net/fix.php?id=21979&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=21979&r=gnused

« previous php.bugs (#31755) next »