PHP
·
发表于 5年以前
·
阅读量:8303
ÔÙÓÃÓóÌÐoʱ£¬Ò»°aÐeÒª¶Ôphp°ae±¾ºÅÕuÊý»¯ºo½øÐÐÅжϣ¬´Ó¶øÈ*¶¨Êa³o¡£
<?php
$temp=explode(".",phpversion()); //ÒÔÊý×eÐÎʽ»ñÈ¡°ae±¾ºÅ
$num=count($temp); //¼ÆËaÊý×eÖеÄÔªËØÊýÁ¿
$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;
?>