ID: 38402
Updated by: [EMAIL PROTECTED]
Reported By: david dot nqd at gmail dot com
-Status: Open
+Status: Closed
Bug Type: Documentation problem
Operating System: Irrelevant
PHP Version: Irrelevant
New Comment:
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.
Thank you for the report, and for helping us make our documentation
better.
Previous Comments:
------------------------------------------------------------------------
[2006-08-10 08:31:05] RQuadling at GMail dot com
The source to this function /php-src/ext/spl/spl_array.c /* $Id:
spl_array.c,v 1.111 2006/05/20 19:47:18 helly Exp $ */ Lines 493-504
are
/* {{{ proto bool ArrayObject::offsetGet(mixed $index)
proto bool ArrayIterator::offsetGet(mixed $index)
Returns the value at the specified $index. */
SPL_METHOD(Array, offsetGet)
{
zval *index, *value;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &index) ==
FAILURE) {
return;
}
value = spl_array_read_dimension_ex(0, getThis(), index, BP_VAR_R
TSRMLS_CC);
RETURN_ZVAL(value, 1, 0);
} /* }}} */
As the manual is based upon the proto defined in the source, it LOOKS
like the proto is incorrect.
Can you give a short proof?
------------------------------------------------------------------------
[2006-08-09 20:19:08] david dot nqd at gmail dot com
Description:
------------
Hi,
The documented return type of ArrayObject::offsetGet is bool, when it
should it be mixed (?)
The documentation for this function: "Returns the value at the
specified $index" which may or may not be boolean.
- David
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38402&edit=1