When I build a PHP module extension in C, how can I know the “short” version number of PHP I’m dealing with ? (5.4, 5.3, 5.2, 5.x, …)
ZEND_MODULE_API_NO only relies on a format like YYYYMMDD (eg: 20060613) !?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The Zend Engine defines a few macros in the
php_version.hheader for that purpose:Per example, if you want to check if the extension is running on 5.3, you’d do: