Home  >  Article  >  PHP Framework  >  Three ways to check the current version number of thinkphp

Three ways to check the current version number of thinkphp

藏色散人
藏色散人forward
2021-02-03 15:31:0115310browse

The following tutorial column of thinkphp will introduce you to three methods of checking the current version number of thinkphp. I hope it will be helpful to friends in need!

There are two ways to check the current thinkphp version, the first one I commonly use

( Version 5.0 and below)

TP defines a constant (THINK_VERSION),
is used to store the version number of the current system. If you need to check, you can print it directly
var_dump(THINK_VERSION );
Three ways to check the current version number of thinkphp## The second type (version 5.1)

Enter on the command line


php think version
Three ways to check the current version number of thinkphp The third type (5.1 version)

5.1 version changes the constant THINK_VERSION to App::version()

use think\facade\App;

before printing You can print directly


var_dump(App::version());
Three ways to check the current version number of thinkphp

The above is the detailed content of Three ways to check the current version number of thinkphp. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete