Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7160777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:27:15+00:00 2026-05-28T13:27:15+00:00

When I build a PHP module extension in C, how can I know the

  • 0

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) !?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:27:16+00:00Added an answer on May 28, 2026 at 1:27 pm

    The Zend Engine defines a few macros in the php_version.h header for that purpose:

    #define PHP_MAJOR_VERSION 5
    #define PHP_MINOR_VERSION 3
    #define PHP_RELEASE_VERSION 3
    #define PHP_EXTRA_VERSION "-1ubuntu9.7"
    #define PHP_VERSION "5.3.3-1ubuntu9.7"
    #define PHP_VERSION_ID 50303
    

    Per example, if you want to check if the extension is running on 5.3, you’d do:

    if (PHP_VERSION_ID < 50300) {
        // PHP 5.2 or before!
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the DOM extension in PHP to build some HTML documents, and I
I've build a small web-service in PHP. I want to control the number of
I'm using Apache 2.2.X and PHP 5.2.X (installed as Apache module) to build a
Just installed Apache 2.2 (installed as a module) and latest PHP build on my
I am to build a PHP application for a website that already has another
I am using MySQL and PHP to build a data layer for a flash
I build a css file using PHP which allows me to easily customize the
I am using PHP and jQuery to build an interactive timeline which needs to
I'm planning to build a CMS in PHP and MySQL, mainly for my own
How do you build a hierarchical set of tags with data in PHP? For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.