Created
May 9, 2019 18:38
-
-
Save egorsmkv/14105d5071fa3f976bedb1f724fcee7e to your computer and use it in GitHub Desktop.
A script for checking Laravel requirements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This script checks all requirements which a server | |
// must have for correct work of Laravel 5.8 | |
// | |
// Author: Yehor Smoliakov | |
$phpVersion = '7.1.3'; | |
$exts = ['openssl', 'pdo', 'mbstring', 'tokenizer', 'xml', 'ctype', 'json', 'bcmath']; | |
if (version_compare(PHP_VERSION, $phpVersion) <= 0) { | |
echo sprintf("Your current PHP version - %s - is not compatible with Laravel\n", PHP_VERSION); | |
exit; | |
} | |
foreach ($exts as $ext) { | |
if (!extension_loaded($ext)) { | |
echo sprintf("Extension - %s - is not loaded, you must install it\n", $ext); | |
} | |
} | |
echo "Analyzing is done.\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment