original_string: private function convertToBytes($memoryLimit)
      {
          if ('-1' === $memoryLimit) {
              return -1;
          }
  
          $memoryLimit = strtolower($memoryLimit);
          $max = strtolower(ltrim($memoryLimit, '+'));
          if (0 === strpos($max, '0x')) {
              $max = intval($max, 16);
          } elseif (0 === strpos($max, '0')) {
              $max = intval($max, 8);
          } else {
              $max = intval($max);
          }
  
          switch (substr($memoryLimit, -1)) {
              case 't': $max *= 1024;
              case 'g': $max *= 1024;
              case 'm': $max *= 1024;
              case 'k': $max *= 1024;
          }
  
          return $max;
      }
code: private function convertToBytes($memoryLimit)
      {
          if ('-1' === $memoryLimit) {
              return -1;
          }
  
          $memoryLimit = strtolower($memoryLimit);
          $max = strtolower(ltrim($memoryLimit, '+'));
          if (0 === strpos($max, '0x')) {
              $max = intval($max, 16);
          } elseif (0 === strpos($max, '0')) {
              $max = intval($max, 8);
          } else {
              $max = intval($max);
          }
  
          switch (substr($memoryLimit, -1)) {
              case 't': $max *= 1024;
              case 'g': $max *= 1024;
              case 'm': $max *= 1024;
              case 'k': $max *= 1024;
          }
  
          return $max;
      }
code_tokens: private function convertToBytes ( $ memoryLimit ) { if ( '-1' === $ memoryLimit ) { return - 1 ; } $ memoryLimit = strtolower ( $ memoryLimit ) ; $ max = strtolower ( ltrim ( $ memoryLimit , '+' ) ) ; if ( 0 === strpos ( $ max , '0x' ) ) { $ max = intval ( $ max , 16 ) ; } elseif ( 0 === strpos ( $ max , '0' ) ) { $ max = intval ( $ max , 8 ) ; } else { $ max = intval ( $ max ) ; } switch ( substr ( $ memoryLimit , - 1 ) ) { case 't' : $ max *= 1024 ; case 'g' : $ max *= 1024 ; case 'm' : $ max *= 1024 ; case 'k' : $ max *= 1024 ; } return $ max ; }
docstring: Convert mixed to bytes.
  
  @param mixed $memoryLimit
  
  @return integer
docstring_tokens: Convert mixed to bytes .