#49807 [NEW]: Incorrect type signatures for methods

From: Date: Wed, 07 Oct 2009 21:06:36 +0000
Subject: #49807 [NEW]: Incorrect type signatures for methods
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-2906@lists.php.net to get a copy of this message
From: jriddy at gmail dot com Operating system: N/A PHP version: Irrelevant PHP Bug Type: Documentation problem Bug description: Incorrect type signatures for methods Description: ------------ The type signatures for methods are misleading. All values of $offset could also be of type integer, and in the case of offsetSet, the $offset could also be null, as is standard in normal PHP array push notation: (e.g., $array[] = 'new value';). Since these methods are similar to __get() and __set(), which are guaranteed to receive a string as their first param, it is important to clearly indicated that the type for ArrayAccess methods is string|int. In addition, the type of the $value parameter for offsetSet should be mixed. Reproduce code: --------------- --- From manual page: class.arrayaccess --- -- Edit bug report at http://bugs.php.net/?id=49807&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49807&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49807&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49807&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49807&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49807&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49807&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49807&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49807&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49807&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49807&r=support Expected behavior: http://bugs.php.net/fix.php?id=49807&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49807&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49807&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49807&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49807&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49807&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49807&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49807&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49807&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49807&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49807&r=mysqlcfg

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