ulvis.paste.net - pastebin

Paste Search Dynamic
Recent pastes
count
  1. <?php
  2.  
  3. $s = "aaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbmmmmmmsmmmmammmmmmmmmmxyz";
  4.  
  5.  
  6.        $countTotal = 0;
  7.        $countErrors = 0;
  8.        $validChars = range('a', 'm');
  9.        $chars = str_split($s);
  10.        foreach ($chars as $char){
  11.          $countTotal++;
  12.          $x = array_search($char, $validChars);
  13.          echo "$char\n";
  14.          echo "$x\n";
  15.  //        if (array_search($char, $validChars) == false){
  16.   //         $countErrors++;
  17.   //         echo "$char\n";
  18.  //        }
  19.         }
  20.  
  21.       //echo "{$countErrors}/{$countTotal}";
  22.  
  23. ?>
Parsed in 0.010 seconds