File tree 1 file changed +34
-0
lines changed
1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ 64-bit Memcached::increment() decrement() incrementByKey() decrementByKey()
3
+ --SKIPIF--
4
+ <?php include "skipif.inc " ;
5
+ if (PHP_INT_SIZE < 8 ) {
6
+ die ("This PHP does not support 64-bit integers " );
7
+ }
8
+ ?>
9
+ --FILE--
10
+ <?php
11
+ include dirname (__FILE__ ) . '/config.inc ' ;
12
+ $ m = memc_get_instance ();
13
+
14
+ echo "Enormous offset 64-bit \n" ;
15
+ $ m ->increment ('foo ' , 0x7ff000000 );
16
+ var_dump ($ m ->get ('foo ' ));
17
+
18
+ $ m ->decrement ('foo ' , 0x7f000000 );
19
+ var_dump ($ m ->get ('foo ' ));
20
+
21
+ echo "Enormous offset 64-bit by key \n" ;
22
+ $ m ->incrementByKey ('foo ' , 'foo ' , 0x10000000 );
23
+ var_dump ($ m ->get ('foo ' ));
24
+
25
+ $ m ->decrementByKey ('foo ' , 'foo ' , 0x10000000 );
26
+ var_dump ($ m ->get ('foo ' ));
27
+
28
+ --EXPECT --
29
+ Enormous offset 64 -bit
30
+ int (4294967296 )
31
+ int (1 )
32
+ Enormous offset 64 -bit by key
33
+ int(4294967296 )
34
+ int(1 )
You can’t perform that action at this time.
0 commit comments