Doc #73771 [Opn->Ver]: Wrong "return values" section
| From: | cmb@php.net | Date: | Mon, 23 Apr 2018 15:39:07 +0000 |
| Subject: | Doc #73771 [Opn->Ver]: Wrong "return values" section | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-15622@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73771&edit=1
ID: 73771
Updated by: cmb@php.net
Reported by: rjhdby@php.net
Summary: Wrong "return values" section
-Status: Open
+Status: Verified
Type: Documentation Problem
Package: COM related
PHP Version: Irrelevant
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
> It is bitwise, not logical, operation.
Indeed, so apparently MSDN is wrong, also wrt. VarXor which also
works bitwise.
Previous Comments:
------------------------------------------------------------------------
[2016-12-17 18:20:29] andrewgrom at rambler dot ru
$a = new VARIANT(255, VT_UI1); // 11111111
$b = new VARIANT(2, VT_UI1); // 00000010
$c = variant_eqv($a, $b);
echo "result is: ".$c;
result is: 2 <--- Does not match description "If each bit in left is equal to the
corresponding bit in right then TRUE is returned, otherwise FALSE is returned."
It is bitwise, not logical, operation.
------------------------------------------------------------------------
[2016-12-17 11:43:49] requinix@php.net
It's equivalence: returning boolean makes sense. And it mirrors the VarEqv documentation.
https://msdn.microsoft.com/en-us/library/windows/desktop/ms221077(v=vs.85).aspx
What's the problem?
------------------------------------------------------------------------
[2016-12-17 09:49:47] rjhdby@php.net
Description:
------------
---
From manual page: http://www.php.net/function.variant-eqv
---
Totaly wrong:
"If each bit in left is equal to the corresponding bit in right then TRUE is returned,
otherwise FALSE is returned."
This is BITWISE operation.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73771&edit=1