Bug #78271 [Com]: Invalid result of if-else

From: Date: Wed, 10 Jul 2019 13:55:59 +0000
Subject: Bug #78271 [Com]: Invalid result of if-else
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221686@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78271&edit=1 ID: 78271 Comment by: sjon@php.net Reported by: marekc at softel dot com dot pl Summary: Invalid result of if-else Status: Verified Type: Bug Package: opcache Operating System: Linux Debian 8.11 64bit PHP Version: 7.3.7 Block user comment: N Private report: N New Comment: Are you sure? Works fine here; https://3v4l.org/3RYph what additional modules do you have enabled? Previous Comments: ------------------------------------------------------------------------ [2019-07-10 13:54:05] nikic@php.net Confirming under opcache. ------------------------------------------------------------------------ [2019-07-10 13:51:27] marekc at softel dot com dot pl Description: ------------ The test script should print "block1" but on 7.3.7 prints "none1". Also tested on 7.2 and 7.1, it's "block1" there. Test script: --------------- <? function test($a, $b){ if($a==10){$w="x";}else{$w="y";} if($b){$d1="none";$d2="block";}else{$d1="block";$d2="none";} echo $d2.$b; } test(1,1); ?> Expected result: ---------------- block1 Actual result: -------------- none1 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78271&edit=1

« previous php.bugs (#221686) next »