Doc #74550 [NEW]: Illegal behaviour in booleans
| From: | lee dot traynor at skeptic dot de | Date: | Sat, 06 May 2017 13:11:50 +0000 |
| Subject: | Doc #74550 [NEW]: Illegal behaviour in booleans | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-14674@lists.php.net to get a copy of this message | ||
From: lee dot traynor at skeptic dot de
Operating system: Windows 10
PHP version: 7.0.18
Package: PHP Language Specification
Bug Type: Documentation Problem
Bug description:Illegal behaviour in booleans
Description:
------------
---
From manual page: http://www.php.net/language.types.boolean
---
Evaluation of boolean expressions leads to conflicting (and incorrect)
results.
Test script:
---------------
$ctm = true and (false or false);
var_dump ($ctm, true and (false or false));
returns true, false
Expected result:
----------------
Should return false, false, and does in fact return this if the
expression that is assigned to $ctm is enclosed in brackets.
--
Edit bug report at https://bugs.php.net/bug.php?id=74550&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74550&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74550&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74550&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74550&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74550&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74550&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74550&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74550&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74550&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74550&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74550&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74550&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74550&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74550&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74550&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74550&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74550&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74550&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74550&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74550&r=mysqlcfg