Do not use 'elseif' construction.
The build was successful.
Details
The build was successful.
Details
This commit is contained in:
parent
e5d7977995
commit
549b2ff3b4
|
@ -21,13 +21,13 @@ class Program {
|
||||||
$c = ord($str[$i]);
|
$c = ord($str[$i]);
|
||||||
if($c >= 128) {
|
if($c >= 128) {
|
||||||
if(($c >= 254)) return false;
|
if(($c >= 254)) return false;
|
||||||
elseif($c >= 252) $bits=6;
|
else if($c >= 252) $bits=6;
|
||||||
elseif($c >= 248) $bits=5;
|
else if($c >= 248) $bits=5;
|
||||||
elseif($c >= 240) $bits=4;
|
else if($c >= 240) $bits=4;
|
||||||
elseif($c >= 224) $bits=3;
|
else if($c >= 224) $bits=3;
|
||||||
elseif($c >= 192) $bits=2;
|
else if($c >= 192) $bits=2;
|
||||||
else return false;
|
else return false;
|
||||||
if(($i+$bits) > $len) return false;
|
if(($i + $bits) > $len) return false;
|
||||||
while($bits > 1) {
|
while($bits > 1) {
|
||||||
$i++;
|
$i++;
|
||||||
$b=ord($str[$i]);
|
$b=ord($str[$i]);
|
||||||
|
|
Loading…
Reference in New Issue