Browse Source

Do not use 'elseif' construction.

pull/50/head
Rafal Kupiec 2 years ago
parent
commit
549b2ff3b4
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      tests/utf8_variables.aer

+ 6
- 6
tests/utf8_variables.aer View File

@ -21,13 +21,13 @@ class Program {
$c = ord($str[$i]);
if($c >= 128) {
if(($c >= 254)) return false;
elseif($c >= 252) $bits=6;
elseif($c >= 248) $bits=5;
elseif($c >= 240) $bits=4;
elseif($c >= 224) $bits=3;
elseif($c >= 192) $bits=2;
else if($c >= 252) $bits=6;
else if($c >= 248) $bits=5;
else if($c >= 240) $bits=4;
else if($c >= 224) $bits=3;
else if($c >= 192) $bits=2;
else return false;
if(($i+$bits) > $len) return false;
if(($i + $bits) > $len) return false;
while($bits > 1) {
$i++;
$b=ord($str[$i]);


Loading…
Cancel
Save