bytes() public static method

Format byte code to human understand
public static bytes ( integer $bytes, integer $precision = 2 ) : string
$bytes integer number of bytes
$precision integer after comma numbers
return string
 /**
  * Check maximum file size
  *
  * @param \Phalcon\Http\Request\File $file
  * @param mixed $value
  * @return bool
  */
 public function checkMaxsize(\Phalcon\Http\Request\File $file, $value)
 {
     //conversion to the desired format
     if (is_array($value) === true) {
         $value = $value[key($value)];
     }
     // check
     if ($file->getSize() > (int) $value) {
         $this->errors[] = sprintf(Message::get('INVALID_MAX_SIZE'), $file->getName(), Format::bytes($value));
         return false;
     }
     return true;
 }