Home  >  Article  >  Backend Development  >  How to check the installed php version information in linux

How to check the installed php version information in linux

藏色散人
藏色散人Original
2022-01-17 09:50:407790browse

How to check the installed PHP version information on Linux: 1. Use the shell command "php -v" to check the PHP version information; 2. Check the PHP version information through the PHP script "echo PHP_VERSION; echo phpversion();" .

How to check the installed php version information in linux

The operating environment of this article: linux5.9.8 system, PHP5.4.16 version, DELL G3 computer

How to check the installed php in linux Version Information?

1. Use shell command to view:

php -v

Output:

PHP 5.4.16 (cli) (built: May 12 2016 13:45:17)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

2. View in PHP script:

<?php
echo PHP_VERSION; // 5.4.16
echo phpversion();  // 5.4.16

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to check the installed php version information in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn