Bug #78002 [Opn]: APCUIterator regexp array returns no results

From: Date: Sat, 11 May 2019 14:08:26 +0000
Subject: Bug #78002 [Opn]: APCUIterator regexp array returns no results
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220818@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78002&edit=1 ID: 78002 Updated by: cmb@php.net Reported by: ariartwt at gmail dot com Summary: APCUIterator regexp array returns no results Status: Open Type: Bug Package: Unknown/Other Function Operating System: Ubuntu 18.04.2 PHP Version: 7.2.18 Block user comment: N Private report: N New Comment: From looking at the code, it appears that the array form expects exactly matching strings, not regexps. Previous Comments: ------------------------------------------------------------------------ [2019-05-11 10:50:50] ariartwt at gmail dot com Description: ------------ --- From manual page: https://php.net/apcuiterator.construct --- Passing in an array of PCRE regular expressions to the constructor of APCUIterator as first argument never return any result. Test script: --------------- <?php apcu_add("Test","data"); echo (new APCUIterator("/^Test$/"))->getTotalCount();// 1 echo (new APCUIterator(["Test"]))->getTotalCount();// 1 echo (new APCUIterator(["/^Test$/"]))->getTotalCount();// 0 -> should be 1 Expected result: ---------------- In my understanding of the documentation, we should be able to pass as first argument an array filled with regexp to find matching entries in apcu's stored keys. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=78002&edit=1

« previous php.bugs (#220818) next »