Bug #71706 [Opn]: Assignment operators in "if" expression

From: Date: Thu, 03 Mar 2016 07:21:59 +0000
Subject: Bug #71706 [Opn]: Assignment operators in "if" expression
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-199573@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71706&edit=1 ID: 71706 User updated by: dmitryscaletta at mail dot ru Reported by: dmitryscaletta at mail dot ru Summary: Assignment operators in "if" expression Status: Open Type: Bug Package: *General Issues Operating System: Windows 10 PHP Version: 7.0.3 Block user comment: N Private report: N New Comment: (I made a mistake) Expected result: ---------------- 78 Actual result: -------------- 1 Previous Comments: ------------------------------------------------------------------------ [2016-03-03 07:20:15] dmitryscaletta at mail dot ru Description: ------------ I expect "78" or warning, but i have "1" Test script: --------------- <?php if ($var = 78 || $var = 456 || $var = 464) { echo $var; } Expected result: ---------------- 1 Actual result: -------------- 78 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=71706&edit=1

« previous php.bugs (#199573) next »