ID:               38402
 Comment by:       RQuadling at GMail dot com
 Reported By:      david dot nqd at gmail dot com
 Status:           Open
 Bug Type:         Documentation problem
 Operating System: Irrelevant
 PHP Version:      Irrelevant
 New Comment:

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?


Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to