Мой профиль...

Поиск по этому блогу

понедельник, 19 марта 2018 г.

Writing universal PHP Extension for different version (PHP5 && PHP7)

After 7.x version ZEND changed Zend_API for PHP extentions.
For making universal extension, you can use the next structure:

#if ZEND_MODULE_API_NO >= 20151012
// ...
#endif

The following table lists PHP versions within Zend products with their internal API versions and Zend products versions.

PHP Version PHP Extension Zend Extension Zend Server Zend Guard Zend Encoder ID
PHP 5.2 (EOL) 20060613 220060519 5.6 (LTS, EOL) 5.5 3
PHP 5.3 20090626 220090626 6.3 (LTS) 6 4
PHP 5.4 20100525 220100525 7 (LTS) 6 5
PHP 5.5 20121212 220121212 8 7 6
PHP 5.6 20131226 220131226 8 (LTS) 7 7
PHP 7.0 20151012 320151012 9 (EA) N/A N/A

Notes

LTS stands for "Long Term Support", which means that within a specific Zend Server version, one PHP version will be maintained with stability and security fixes by Zend beyond the timeframe defined by PHP community. You might also find out that specific PHP versions appears in multiple Zend Server versions, but only one LTS PHP version exists in every Zend Server version, and appears below as such.
EA stands for Early Access.
EOL stands for End of Life project status.

Zend (Guard) Encoder / Loader ID is an embedded number within each encoded PHP file, identifying PHP version according to the above table. When encoding PHP scripts using Zend Guard, the runtime PHP must be the same version as encoded version, otherwise you get an incompatible file format error instead of script execution.

PHP for Windows

PHP is built by Zend labs as Non-Thread-Safe (NTS), with these Visual Studio versions:
PHP 5.3+5.4: VC9, VS 2008 SP1
PHP 5.5+5.6: VC11, VS 2012
PHP 7: VC14, VS 2015

    Комментариев нет:

    Релевантные посты...

    Related Posts with Thumbnails