File: apc_store_array_int_keys.phpt

package info (click to toggle)
php-apcu 5.1.19%2B4.0.11-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,920 kB
  • sloc: ansic: 10,965; php: 1,736; xml: 903; pascal: 5; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 382 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--TEST--
apcu_store() with int keys in array should convert them to string
--SKIPIF--
<?php
require_once(__DIR__ . '/skipif.inc');
?>
--INI--
apc.enabled=1
apc.enable_cli=1
--FILE--
<?php

var_dump(apcu_add(["123" => "test"]));
var_dump(apcu_store(["123" => "test"]));
var_dump(apcu_add(["123" => "test"]));

?>
--EXPECT--
array(0) {
}
array(0) {
}
array(1) {
  [123]=>
  int(-1)
}