title: Warning: Undefined array key 63 php8
body: <pre><code> function decode($encoded, $key)
   {
          $strofsym = &quot;qwertyuiopasdfghjklzxcvbnm1234567890QWERTYUIOPASDFGHJKLZXCVBNM=&quot;; 
          $x = 0;
          while ($x++&lt;= strlen($strofsym))
          {
              $tmp = md5(md5($key.$strofsym[$x-1]).$key);
              $encoded = str_replace($tmp[3].$tmp[6].$tmp[1].$tmp[2], 
              $strofsym[$x-1], $encoded);
          }
          return base64_decode($encoded);
   }
  </code></pre>
  <p>when switching to PHP 8 I get the following error. on PHP 7.2 works well.
  Warning: Undefined array key 63 in line 7 and 8
  HElp me, please.</p>