php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78869 function apcu_add() cannot handle var starting with 'apcu_stock_' correctly
Submitted: 2019-11-26 03:13 UTC Modified: -
From: 1050575278 at qq dot com Assigned:
Status: Open Package: APC (PECL)
PHP Version: 7.1.33 OS: win7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: 1050575278 at qq dot com
New email:
PHP Version: OS:

 

 [2019-11-26 03:13 UTC] 1050575278 at qq dot com
Description:
------------
---
From manual page: https://php.net/book.apcu
---

env:

php_apcu-5.1.8-7.1-ts-vc14-x64

Test script:
---------------
env:
php_apcu-5.1.8-7.1-ts-vc14-x64

test code:

apcu_add('apcu_stock_1', 100);
var_dump(apcu_fetch('apcu_stock_1')); // result: int 0

apcu_add('apcu_stock_2', 100);
var_dump(apcu_fetch('apcu_stock_2')); // result: string '100'

apcu_add('apcu_stock_3', 100);
var_dump(apcu_fetch('apcu_stock_3')); // result: int 100

...


Expected result:
----------------
int 100

Actual result:
--------------
int 0 or string 100 or int 100 ...

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Jan 19 00:01:24 2020 UTC