intval($perm2[0])) { return false; } if (intval($perm1[1]) > intval($perm2[1])) { return false; } if (intval($perm1[2]) > intval($perm2[2])) { return false; } return true; } public static function ValidPermission(&$permission){ if( strlen($permission) == 3 ){ return true; } if( strlen($permission) == 4 ){ if( intval($permission[0]) === 0 ){ $permission = substr($permission,1); return true; } } return false; } /** * @description Gets Groups members of the PHP Engine * @return array The Group members of the PHP Engine * */ public static function process_members() { $info = self::process_info(); if (isset($info['members'])) { return $info['members']; } return array(); } /** * @description Gets User ID of the file owner * @return int The user ID of the file owner * */ public static function file_uid($file) { $info = self::file_info($file); if( is_array($info) && isset($info['uid']) ){ return $info['uid']; } } /** * @description Gets Info array of the file owner * @return array The Info array of the file owner * */ public static function file_info($file) { return posix_getpwuid(@fileowner($file)); } /** * @description Gets Group Info of the PHP Engine * @return array The Group Info of the PHP Engine * */ public static function process_info() { return posix_getgrgid(posix_getegid()); } }