Doc #61078 [Com]: Just a little mistake in the example
| From: | phpmpan at mpan dot pl | Date: | Tue, 14 Feb 2012 09:41:52 +0000 |
| Subject: | Doc #61078 [Com]: Just a little mistake in the example | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-7940@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61078&edit=1
ID: 61078
Comment by: phpmpan at mpan dot pl
Reported by: tomek at rychtyk dot pl
Summary: Just a little mistake in the example
Status: Open
Type: Documentation Problem
Package: Documentation problem
Operating System: Win 7
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
r306288 changed this behaviour. As of 5.3.6 array_product returns 1, as expected.
A warning should be added to the documentation for versions before 5.3.6.
Previous Comments:
------------------------------------------------------------------------
[2012-02-13 22:36:54] tomek at rychtyk dot pl
Description:
------------
---
From manual page: http://www.php.net/function.array-product#refsect1-function.array-product-examples
---
I think there is a mistake in the example on that page as the following:
echo "product(array()) = " . array_product(array()) . "\n";
will display:
product(array()) = 0
not:
product(array()) = 1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61078&edit=1