diff --git a/backoff.c b/backoff.c index 1be04a8..e795cb9 100644 --- a/backoff.c +++ b/backoff.c @@ -6,12 +6,6 @@ #include #endif -#if PHP_VERSION_ID < 70100 -static zend_long php_mt_rand_range(zend_long min, zend_long max) { - return min + php_rand() % (max - min + 1) -} -#endif - #include "backoff.h" static zend_ulong random_range(zend_ulong min, zend_ulong max) { diff --git a/library.c b/library.c index 852a583..5dd802a 100644 --- a/library.c +++ b/library.c @@ -100,15 +100,7 @@ static int redis_mbulk_reply_zipped_raw_variant(RedisSock *redis_sock, zval *zre /* Register a persistent resource in a a way that works for every PHP 7 version. */ void redis_register_persistent_resource(zend_string *id, void *ptr, int le_id) { -#if PHP_VERSION_ID < 70300 - zend_resource res; - res.type = le_id; - res.ptr = ptr; - - zend_hash_str_update_mem(&EG(persistent_list), ZSTR_VAL(id), ZSTR_LEN(id), &res, sizeof(res)); -#else zend_register_persistent_resource(ZSTR_VAL(id), ZSTR_LEN(id), ptr, le_id); -#endif } static ConnectionPool * diff --git a/redis_session.c b/redis_session.c index 96f39be..8abdbe8 100644 --- a/redis_session.c +++ b/redis_session.c @@ -413,11 +413,7 @@ static void lock_release(RedisSock *redis_sock, redis_session_lock_status *lock_ } } -#if PHP_VERSION_ID < 70300 -#define REDIS_URL_STR(umem) umem -#else #define REDIS_URL_STR(umem) ZSTR_VAL(umem) -#endif /* {{{ PS_OPEN_FUNC */