summaryrefslogtreecommitdiff
path: root/Zend/zend_extensions.h
diff options
context:
space:
mode:
authorc9s <yoanlin93@gmail.com>2015-09-16 14:31:48 +0800
committerc9s <yoanlin93@gmail.com>2015-09-25 08:46:46 +0800
commit1273ae85f1c3d67d664643ac5dccb95f74663f2b (patch)
tree8906b156712675945ce78cb39b86d00df4f148d7 /Zend/zend_extensions.h
parent0eb689fa0df0bb0a1a4415aa608f9e00a79653fa (diff)
downloadphp-git-1273ae85f1c3d67d664643ac5dccb95f74663f2b.tar.gz
List PHP extension api version nos in zend_extensions.h
- Put doc constants in comment - Link to github issue #1523
Diffstat (limited to 'Zend/zend_extensions.h')
-rw-r--r--Zend/zend_extensions.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h
index 8ef773badf..423bac111b 100644
--- a/Zend/zend_extensions.h
+++ b/Zend/zend_extensions.h
@@ -25,6 +25,27 @@
#include "zend_compile.h"
#include "zend_build.h"
+/*
+The constants below are derived from ext/opcache/ZendAccelerator.h
+
+You can use the following macro to check the extension API version for compatibilities:
+
+#define ZEND_EXTENSION_API_NO_5_0_X 220040412
+#define ZEND_EXTENSION_API_NO_5_1_X 220051025
+#define ZEND_EXTENSION_API_NO_5_2_X 220060519
+#define ZEND_EXTENSION_API_NO_5_3_X 220090626
+#define ZEND_EXTENSION_API_NO_5_4_X 220100525
+#define ZEND_EXTENSION_API_NO_5_5_X 220121212
+#define ZEND_EXTENSION_API_NO_5_6_X 220131226
+#define ZEND_EXTENSION_API_NO_7_1_X 320140815
+
+#if ZEND_EXTENSION_API_NO < ZEND_EXTENSION_API_NO_5_5_X
+ // do something for php versions lower than 5.5.x
+#endif
+
+@see https://github.com/php/php-src/pull/1523
+*/
+
/* The first number is the engine version and the rest is the date (YYYYMMDD).
* This way engine 2/3 API no. is always greater than engine 1 API no..
*/