Use the string function to output the integer PHP version number. When using a program, you generally need to integer the php version to determine the output .? Php $ tempexplode (., phpversion (); get the version number $ numcount ($ tem) in the form of an array and then use the program. Generally, you need to integer the php version number to determine the output.
$ Temp = explode (".", phpversion (); // Obtain the version number as an array
$ Num = count ($ temp); // calculates the number of elements in the array.
$ Phpver = 0;
Switch ($ num)
{
Cas 3:
$ Phpver = $ phpver + (intval ($ temp [2]);
Cas 2:
$ Phpver = $ phpver + (intval ($ temp [1] * 10 );
Cas 1:
$ Phpver = $ phpver + (intval ($ temp [0] * 100 );
Default:
}
Echo $ phpver;
?>
Bytes. ? Php $ temp = explode (., phpversion (); // Obtain the version number in array format $ num = count ($ tem...