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: 2021-06-22 12:24 UTC
Votes:1
Avg. Score:2.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: 1050575278 at qq dot com Assigned: cmb (profile)
Status: Closed Package: APC (PECL)
PHP Version: 7.1.33 OS: win7
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-06-22 12:24 UTC] cmb@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: cmb
 [2021-06-22 12:24 UTC] cmb@php.net
The bug tracker of APCu has been moved to Github[1].  If you stll
experience this issue with the latest APCu release (5.1.20),
please report the issue there.

[1] <https://github.com/krakjoe/apcu/issues>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 00:01:28 2024 UTC