How to view PHP version information

Source: Internet
Author: User
Tags php server phpinfo
PHP version control has always been a tricky issue, because the different versions lead to a lot of features can not be implemented very well, so when the program is uploaded to the space must be effective control of the version, so as to avoid unnecessary trouble to produce. So how do you check the current version of PHP? Here are two ways to help you check your PHP version.

Using the Phpinfo () function, this function is used to display the PHP server configuration information, in your environment to create a PHP file, in the data below the code, and then the execution will print the following results, you can see clearly, your current version of PHP, PHP, Apache, MySQL and other configuration information.
   Phpinfo ();
?>
Using the Phpsersion () function, the prototype of this function is a string phpversion (void); Returns a string that returns the PHP version information, creates a PHP file, enters the following code, You can see the version of PHP returned in the browser.
   Echo Phpversion ();
?>
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.