Doc #74115 [NEW]: This doc has some error descriptions.

From: Date: Fri, 17 Feb 2017 03:36:53 +0000
Subject: Doc #74115 [NEW]: This doc has some error descriptions.
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-14444@lists.php.net to get a copy of this message
From: nick at lampnick dot com Operating system: windows 7 PHP version: 5.6.30 Package: Documentation problem Bug Type: Documentation Problem Bug description:This doc has some error descriptions. Description: ------------ --- From manual page: http://php.net/manual/en/language.operators.logical.php --- $a and $b And TRUE if both $a and $b are TRUE. $a or $b Or TRUE if either $a or $b is TRUE. The 'and' and the 'or' is use for bits,but this doc use for Logical. Test script: --------------- <?php $a = 4; $b = 1; $res1 = $a and $b; $res2 = $a & $b; $res3 = $a or $b; $res4 = $a | $b; var_dump($res1);//the res1 is 4,but the manual describes the result to be a bool type. var_dump($res2); var_dump($res3); var_dump($res4); Expected result: ---------------- $a & $b And Bits that are set in both $a and $b are set. $a | $b Or (inclusive or) Bits that are set in either $a or $b are set. Actual result: -------------- $a and $b And TRUE if both $a and $b are TRUE. $a or $b Or TRUE if either $a or $b is TRUE. -- Edit bug report at https://bugs.php.net/bug.php?id=74115&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74115&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74115&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74115&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=74115&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=74115&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=74115&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=74115&r=needscript Try newer version: https://bugs.php.net/fix.php?id=74115&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=74115&r=support Expected behavior: https://bugs.php.net/fix.php?id=74115&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=74115&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=74115&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=74115&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74115&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=74115&r=dst IIS Stability: https://bugs.php.net/fix.php?id=74115&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=74115&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=74115&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=74115&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=74115&r=mysqlcfg

« previous php.doc.bugs (#14444) next »