File tree 2 files changed +42
-0
lines changed
2 files changed +42
-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 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 "Normal \n" ;
15
+ $ m ->set ('foo ' , 1 );
16
+ var_dump ($ m ->get ('foo ' ));
17
+
18
+ echo "Enormous offset 64-bit \n" ;
19
+ $ m ->increment ('foo ' , 0x100000000 );
20
+ var_dump ($ m ->get ('foo ' ));
21
+
22
+ $ m ->decrement ('foo ' , 0x100000000 );
23
+ var_dump ($ m ->get ('foo ' ));
24
+
25
+ echo "Enormous offset 64-bit by key \n" ;
26
+ $ m ->incrementByKey ('foo ' , 'foo ' , 0x100000000 );
27
+ var_dump ($ m ->get ('foo ' ));
28
+
29
+ $ m ->decrementByKey ('foo ' , 'foo ' , 0x100000000 );
30
+ var_dump ($ m ->get ('foo ' ));
31
+
32
+ --EXPECT --
33
+ Normal
34
+ int (1 )
35
+ Enormous offset 64 -bit
36
+ int (4294967297 )
37
+ int (1 )
38
+ Enormous offset 64 -bit by key
39
+ int (4294967297 )
40
+ int (1 )
You can’t perform that action at this time.
0 commit comments