'any', 'requestData' => [] ]; } public function handler() { if(InstallationDoneController::isInstallationDone()) { throw new RequestException(ERRORS::INIT_SETTINGS_DONE); } Response::respondSuccess([ 'phpVersion' => [ 'name' => 'PHP Version', 'value' => phpversion(), 'ok' => $this->checkVersion() ], 'PDO' => [ 'name' => 'PDO Module', 'value' => class_exists('PDO') ? 'Available' : 'Not available', 'ok' => class_exists('PDO') ], 'configFile' => [ 'name' => 'File: /api/config.php', 'value' => is_writable('config.php') ? 'Writable' : 'Not writable', 'ok' => is_writable('config.php') ], 'files' => [ 'name' => 'Folder: /api/files', 'value' => is_writable('files') ? 'Writable' : 'Not writable', 'ok' => is_writable('files') ] ]); } private function checkVersion() { $requiredVersion = explode('.', CheckRequirementsController::requiredPHPVersion); $currentVersion = explode('.', phpversion()); if($currentVersion[0] > $requiredVersion[0]) return true; else if($currentVersion[0] < $requiredVersion[0]) return false; else return $currentVersion[1] >= $requiredVersion[1]; } }