15
15
return ;
16
16
}
17
17
18
- if (\PHP_VERSION_ID >= 80000 ) {
19
- return require __DIR__ .'/bootstrap80.php ' ;
20
- }
21
-
22
18
if (extension_loaded ('Zend Data Cache ' )) {
23
19
if (!function_exists ('apcu_add ' )) {
24
- function apcu_add ($ key , $ value = null , $ ttl = 0 ) { return p \Apcu::apcu_add ($ key , $ value , $ ttl ); }
20
+ function apcu_add ($ key , mixed $ value, ? int $ ttl = 0 ): array | bool { return p \Apcu::apcu_add ($ key , $ value , ( int ) $ ttl ); }
25
21
}
26
22
if (!function_exists ('apcu_delete ' )) {
27
- function apcu_delete ($ key ) { return p \Apcu::apcu_delete ($ key ); }
23
+ function apcu_delete ($ key ): array | bool { return p \Apcu::apcu_delete ($ key ); }
28
24
}
29
25
if (!function_exists ('apcu_exists ' )) {
30
- function apcu_exists ($ key ) { return p \Apcu::apcu_exists ($ key ); }
26
+ function apcu_exists ($ key ): array | bool { return p \Apcu::apcu_exists ($ key ); }
31
27
}
32
28
if (!function_exists ('apcu_fetch ' )) {
33
- function apcu_fetch ($ key , &$ success = null ) { return p \Apcu::apcu_fetch ($ key , $ success ); }
29
+ function apcu_fetch ($ key , &$ success = null ): mixed { return p \Apcu::apcu_fetch ($ key , $ success ); }
34
30
}
35
31
if (!function_exists ('apcu_store ' )) {
36
- function apcu_store ($ key , $ value = null , $ ttl = 0 ) { return p \Apcu::apcu_store ($ key , $ value , $ ttl ); }
32
+ function apcu_store ($ key , mixed $ value, ? int $ ttl = 0 ): array | bool { return p \Apcu::apcu_store ($ key , $ value , ( int ) $ ttl ); }
37
33
}
38
34
} else {
39
35
if (!function_exists ('apcu_add ' )) {
40
- function apcu_add ($ key , $ value = null , $ ttl = 0 ) { return apc_add ($ key , $ value , $ ttl ); }
36
+ function apcu_add ($ key , mixed $ value, ? int $ ttl = 0 ): array | bool { return apc_add ($ key , $ value , ( int ) $ ttl ); }
41
37
}
42
38
if (!function_exists ('apcu_delete ' )) {
43
- function apcu_delete ($ key ) { return apc_delete ($ key ); }
39
+ function apcu_delete ($ key ): array | bool { return apc_delete ($ key ); }
44
40
}
45
41
if (!function_exists ('apcu_exists ' )) {
46
- function apcu_exists ($ key ) { return apc_exists ($ key ); }
42
+ function apcu_exists ($ key ): array | bool { return apc_exists ($ key ); }
47
43
}
48
44
if (!function_exists ('apcu_fetch ' )) {
49
45
function apcu_fetch ($ key , &$ success = null ) { return apc_fetch ($ key , $ success ); }
50
46
}
51
47
if (!function_exists ('apcu_store ' )) {
52
- function apcu_store ($ key , $ value = null , $ ttl = 0 ) { return apc_store ($ key , $ value , $ ttl ); }
48
+ function apcu_store ($ key , mixed $ value, ? int $ ttl = 0 ): array | bool { return apc_store ($ key , $ value , ( int ) $ ttl ); }
53
49
}
54
50
}
55
51
@@ -75,7 +71,7 @@ function apcu_sma_info($limited = false) { return apc_sma_info($limited); }
75
71
if (!class_exists ('APCuIterator ' , false ) && class_exists ('APCIterator ' , false )) {
76
72
class APCuIterator extends APCIterator
77
73
{
78
- public function __construct ($ search = null , $ format = \ APC_ITER_ALL , $ chunk_size = 100 , $ list = \ APC_LIST_ACTIVE )
74
+ public function __construct ($ search = null , $ format = APC_ITER_ALL , $ chunk_size = 100 , $ list = APC_LIST_ACTIVE )
79
75
{
80
76
parent ::__construct ('user ' , $ search , $ format , $ chunk_size , $ list );
81
77
}
0 commit comments