Doc #65567 [Com]: Documentation does not match thrown error

From: Date: Thu, 27 Feb 2014 09:19:31 +0000
Subject: Doc #65567 [Com]: Documentation does not match thrown error
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11028@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65567&edit=1 ID: 65567 Comment by: blizzz at owncloud dot com Reported by: gavinromberger at yahoo dot com Summary: Documentation does not match thrown error Status: No Feedback Type: Documentation Problem Package: APC Operating System: Mac OSX 10.8 PHP Version: 5.5Git-2013-08-27 (Git) Block user comment: N Private report: N New Comment: I see the same error message, running APCu. Previous Comments: ------------------------------------------------------------------------ [2013-10-15 11:54:48] php-bugs at lists dot php dot net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. ------------------------------------------------------------------------ [2013-09-11 21:45:01] aharvey@php.net Are you running APC or APCu? I can't see any way you'd get that error out of APC proper, but it looks like APCu does change the parameters for APCIterator::__construct() in some circumstances: https://github.com/krakjoe/apcu/blob/simplify/apc_iterator.c#L321-L329 ------------------------------------------------------------------------ [2013-08-27 23:16:55] gavinromberger at yahoo dot com 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 this bug report at https://bugs.php.net/bug.php?id=65567&edit=1

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