Home >Backend Development >PHP Problem >How to check php version in linux

How to check php version in linux

王林
王林Original
2019-10-14 17:57:2027044browse

How to check php version in linux

1. phpinfo() function of php

<?php 
    phpinfo();
?>

Running result: php version

How to check php version in linux

2. Execute php -v from the linux or windows command line

How to check php version in linux

Use php -v directly. You need to configure the environment variables of php, which are not configured. When setting environment variables, you can use the path of php.exe instead of php, see the picture below

How to check php version in linux

Recommended tutorial: PHP video tutorial

The above is the detailed content of How to check php version 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