+#if (PHP_MAJOR_VERSION > 5) || ((PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION >= 3))
+# define ADDREF(z) Z_ADDREF_P(z)
+# define IS_CALLABLE(a,b,c) zend_is_callable((a), (b), (c) TSRMLS_CC)
+#else
+# define ADDREF(z) ZVAL_ADDREF(z)
+# define IS_CALLABLE(a,b,c) zend_is_callable((a), (b), (c))
+#endif