File tree 2 files changed +41
-0
lines changed
2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 74
74
<file role =' src' name =' fastlz/fastlz.c' />
75
75
<file role =' src' name =' fastlz/fastlz.h' />
76
76
<dir name =" tests" >
77
+ <file role =' test' name =' skipif.inc' />
77
78
<file role =' test' name =' 001.phpt' />
78
79
<file role =' test' name =' version.phpt' />
79
80
<file role =' test' name =' bug_16084.phpt' />
@@ -143,6 +144,7 @@ Fixes
143
144
<file role =' test' name =' setmulti.phpt' />
144
145
<file role =' test' name =' cachecallback.phpt' />
145
146
<file role =' test' name =' incrdecr.phpt' />
147
+ <file role =' test' name =' incrdecr_64.phpt' />
146
148
<file role =' test' name =' incrdecr_initial.phpt' />
147
149
<file role =' test' name =' incrdecr_invalid_key.phpt' />
148
150
<file role =' test' name =' incrdecr_bykey.phpt' />
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ 64-bit Memcached::increment() decrement() incrementByKey() decrementByKey()
3
+ --SKIPIF--
4
+ <?php
5
+ include "skipif.inc " ;
6
+ if (PHP_INT_SIZE < 8 ) die ("skip valid for 64-bit PHP only " );
7
+ ?>
8
+ --FILE--
9
+ <?php
10
+ include dirname (__FILE__ ) . '/config.inc ' ;
11
+ $ m = memc_get_instance ();
12
+
13
+ echo "Normal \n" ;
14
+ $ m ->set ('foo ' , 1 );
15
+ var_dump ($ m ->get ('foo ' ));
16
+
17
+ echo "Enormous offset 64-bit \n" ;
18
+ $ m ->increment ('foo ' , 0x100000000 );
19
+ var_dump ($ m ->get ('foo ' ));
20
+
21
+ $ m ->decrement ('foo ' , 0x100000000 );
22
+ var_dump ($ m ->get ('foo ' ));
23
+
24
+ echo "Enormous offset 64-bit by key \n" ;
25
+ $ m ->incrementByKey ('foo ' , 'foo ' , 0x100000000 );
26
+ var_dump ($ m ->get ('foo ' ));
27
+
28
+ $ m ->decrementByKey ('foo ' , 'foo ' , 0x100000000 );
29
+ var_dump ($ m ->get ('foo ' ));
30
+
31
+ --EXPECT --
32
+ Normal
33
+ int (1 )
34
+ Enormous offset 64 -bit
35
+ int (4294967297 )
36
+ int (1 )
37
+ Enormous offset 64 -bit by key
38
+ int (4294967297 )
39
+ int (1 )
You can’t perform that action at this time.
0 commit comments