Bug #79894 [Opn->Csd]: ternary condition perturbates if condition

From: Date: Fri, 24 Jul 2020 17:44:24 +0000
Subject: Bug #79894 [Opn->Csd]: ternary condition perturbates if condition
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228214@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79894&edit=1 ID: 79894 User updated by: fabien dot aurejac at gmail dot com Reported by: fabien dot aurejac at gmail dot com Summary: ternary condition perturbates if condition -Status: Open +Status: Closed Type: Bug Package: *General Issues Operating System: debian 10.4 PHP Version: 7.2.32 Block user comment: N Private report: N New Comment: Ok, seems Previous Comments: ------------------------------------------------------------------------ [2020-07-24 17:42:22] fabien dot aurejac at gmail dot com Description: ------------ When I try this script it should at my point of view return 0 instead of 1 ? am I mistaken ? Test script: --------------- <?php if (false && true?"1":"2") { echo 1; } else { echo 0; } ?> Expected result: ---------------- 0 Actual result: -------------- 1 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79894&edit=1

« previous php.bugs (#228214) next »