original_string: protected function getMemoryLimitInKB()
      {
          $memoryLimitFormatted = $this->getMemoryLimitFromIni();
          $memoryLimitFormatted = strtolower(trim($memoryLimitFormatted));
  
          // No memory limit
          if ($memoryLimitFormatted === '-1') {
              return -1;
          }
  
          if (preg_match('/(\d+)([bkmgt])b?/', $memoryLimitFormatted, $matches)) {
              $amount = intval($matches[1]);
              $unit = $matches[2];
  
              switch ($unit) {
                  case 'b': return ($amount / 1024);
                  case 'k': return $amount;
                  case 'm': return ($amount * 1024);
                  case 'g': return ($amount * 1024 * 1024);
                  case 't': return ($amount * 1024 * 1024 * 1024);
              }
          }
  
          return -1;
      }
code: protected function getMemoryLimitInKB()
      {
          $memoryLimitFormatted = $this->getMemoryLimitFromIni();
          $memoryLimitFormatted = strtolower(trim($memoryLimitFormatted));
  
          // No memory limit
          if ($memoryLimitFormatted === '-1') {
              return -1;
          }
  
          if (preg_match('/(\d+)([bkmgt])b?/', $memoryLimitFormatted, $matches)) {
              $amount = intval($matches[1]);
              $unit = $matches[2];
  
              switch ($unit) {
                  case 'b': return ($amount / 1024);
                  case 'k': return $amount;
                  case 'm': return ($amount * 1024);
                  case 'g': return ($amount * 1024 * 1024);
                  case 't': return ($amount * 1024 * 1024 * 1024);
              }
          }
  
          return -1;
      }
code_tokens: protected function getMemoryLimitInKB ( ) { $ memoryLimitFormatted = $ this -> getMemoryLimitFromIni ( ) ; $ memoryLimitFormatted = strtolower ( trim ( $ memoryLimitFormatted ) ) ; // No memory limit if ( $ memoryLimitFormatted === '-1' ) { return - 1 ; } if ( preg_match ( '/(\d+)([bkmgt])b?/' , $ memoryLimitFormatted , $ matches ) ) { $ amount = intval ( $ matches [ 1 ] ) ; $ unit = $ matches [ 2 ] ; switch ( $ unit ) { case 'b' : return ( $ amount / 1024 ) ; case 'k' : return $ amount ; case 'm' : return ( $ amount * 1024 ) ; case 'g' : return ( $ amount * 1024 * 1024 ) ; case 't' : return ( $ amount * 1024 * 1024 * 1024 ) ; } } return - 1 ; }
docstring: Returns the PHP "memory_limit" in Kilobytes
  
  @return float
docstring_tokens: Returns the PHP memory_limit in Kilobytes