Bug #81329 [NEW]: echo misbehaves when there is a ternary operator

From: Date: Wed, 04 Aug 2021 01:29:10 +0000
Subject: Bug #81329 [NEW]: echo misbehaves when there is a ternary operator
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235582@lists.php.net to get a copy of this message
From: chris at candm dot org dot uk Operating system: Linux Mint 20 Apache 2.4.1 PHP version: 7.4.22 Package: Strings related Bug Type: Bug Bug description:echo misbehaves when there is a ternary operator Description: ------------ When using echo, if a ternary is concatenated after a string, the string is not echoed, only the result from the ternary. PHP version 7.4.3 Apache Version Apache/2.4.41 (Ubuntu) Apache API Version 20120211 Linux Kernel: 5.8.0-63-generic x86_64 bits: 64 Desktop: Cinnamon 4.8.6 Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 Machine: Acer Aspire A515-55 v: V1.08 Test script: --------------- <?php echo "THIS SHOULD SHOW ".(true)?'true':'false'; Expected result: ---------------- Result: THIS SHOULD SHOW true Actual result: -------------- Result true -- Edit bug report at https://bugs.php.net/bug.php?id=81329&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=81329&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=81329&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=81329&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=81329&r=needscript Try newer version: https://bugs.php.net/fix.php?id=81329&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=81329&r=support Expected behavior: https://bugs.php.net/fix.php?id=81329&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=81329&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=81329&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=81329&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=81329&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=81329&r=dst IIS Stability: https://bugs.php.net/fix.php?id=81329&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=81329&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=81329&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=81329&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=81329&r=mysqlcfg

« previous php.bugs (#235582) next »