PHP判断版本号大小

$data[‘version’] = “2.0.3.4.2”;
$res[‘version’] = “2.0.3.4.3”;

verListA=explode(′.′,(string)verListA = explode('.', (string)verListA=explode(.,(string)data[‘version’]); //当前软件版本
verListB=explode(′.′,(string)verListB = explode('.', (string)verListB=explode(.,(string)res[‘version’]); //数据库版本

len=max(count(len = max(count(len=max(count(verListA),count($verListB));
i=−1;while(i = -1; while (i=1;while(i++<$len) {
echo $i;
verListA[verListA[verListA[i] = intval(@verListA[verListA[verListA[i]);
if (verListA[verListA[verListA[i] < 0 ) {
verListA[verListA[verListA[i] = 0; //软件版本号
}
verListB[verListB[verListB[i] = intval(@verListB[verListB[verListB[i]);
if (verListB[verListB[verListB[i] < 0 ) {
verListB[verListB[verListB[i] = 0; //数据库版本
}
if (verListA[verListA[verListA[i]>verListB[verListB[verListB[i]) {
KaTeX parse error: Expected 'EOF', got '}' at position 53: …/版本大小大于数据库 }̲else if (verListA[i]&lt;i]&lt;i]<verListB[$i]) {
KaTeX parse error: Expected 'EOF', got '}' at position 58: …数据库 提供更新 }̲ else if (i==($len-1)) {
$status = false; //循环完毕,没发现大或者小则相等,不更新
break;
}
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值