Doc #65567 [NEW]: Documentation does not match thrown error
From: gavinromberger at yahoo dot com
Operating system: Mac OSX 10.8
PHP version: 5.5Git-2013-08-27 (Git)
Package: APC
Bug Type: Documentation Problem
Bug description:Documentation does not match thrown error
Description:
------------
when running this line of code
new APCIterator('user', '/^Attributes__/', APC_ITER_KEY);
I get this error -
Uncaught exception 'ErrorException' with message
'APCIterator::__construct()
expects parameter 2 to be long, string given'
This is what the documentation states concerning the constructor params -
public APCIterator::__construct ( string $cache [, mixed $search = null [,
int
$format [, int $chunk_size = 100 [, int $list ]]]] )
Specifically for the $search param (param 2) the documentation states -
A PCRE regular expression that matches against APC key names, either as a
string
for a single regular expression, or as an array of regular expressions. Or,
optionally pass in NULL to skip the search.
Test script:
---------------
new APCIterator('user', $search, APC_ITER_KEY);
Expected result:
----------------
I expect to get back an APCIterator object
Actual result:
--------------
fatal error
--
Edit bug report at https://bugs.php.net/bug.php?id=65567&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65567&r=trysnapshot54
Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=65567&r=trysnapshot53
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65567&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65567&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65567&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65567&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65567&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65567&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65567&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65567&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=65567&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=65567&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65567&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65567&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65567&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65567&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65567&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65567&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65567&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65567&r=mysqlcfg
Thread (4 messages)
- gavinromberger at yahoo dot com