com web/bugs: Allow to run on PHP 7 (fix missing apc_* func tions): include/functions.php
| From: | Maciej Sobaczewski | Date: | Fri, 20 Jan 2017 13:48:13 +0000 |
| Subject: | com web/bugs: Allow to run on PHP 7 (fix missing apc_* func tions): include/functions.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-25525@lists.php.net to get a copy of this message | ||
Commit: 0db9df83c9683ffa4358b56fe1f2962ce5704a12
Author: Sobak <msobaczewski@gmail.com> Fri, 20 Jan 2017 14:48:13 +0100
Parents: 30f26dbf6e22e25ea7c22feeed2b9797abd77a47
Branches: master
Link: http://git.php.net/?p=web/bugs.git;a=commitdiff;h=0db9df83c9683ffa4358b56fe1f2962ce5704a12
Log:
Allow to run on PHP 7 (fix missing apc_* functions)
Only ext/apcu is available on PHP7. Some other users might use it,too.
Changed paths:
M include/functions.php
Diff:
diff --git a/include/functions.php b/include/functions.php
index c7e0dc0..b132633 100644
--- a/include/functions.php
+++ b/include/functions..php
@@ -1954,3 +1954,15 @@ function mailto_list(array $mails)
echo rtrim($buffer, ', ');
}
+
+if (!function_exists('apc_fetch')) {
+ function apc_fetch($key, &$success = false) {
+ apcu_fetch($key, $success);
+ }
+}
+
+if (!function_exists('apc_store')) {
+ function apc_store($key, $var, $ttl = 0) {
+ apcu_store($key, $var, $ttl);
+ }
+}