diff --git a/src/pocketmine/PocketMine.php b/src/pocketmine/PocketMine.php index 27d52c0c5..fae48b793 100644 --- a/src/pocketmine/PocketMine.php +++ b/src/pocketmine/PocketMine.php @@ -89,6 +89,18 @@ namespace pocketmine { * Enjoy it as much as I did writing it. I don't want to do it again. */ + if(version_compare("7.0", PHP_VERSION) > 0){ + echo "[CRITICAL] You must use PHP >= 7.0" . PHP_EOL; + echo "[CRITICAL] Please use the installer provided on the homepage." . PHP_EOL; + exit(1); + } + + if(!extension_loaded("pthreads")){ + echo "[CRITICAL] Unable to find the pthreads extension." . PHP_EOL; + echo "[CRITICAL] Please use the installer provided on the homepage." . PHP_EOL; + exit(1); + } + error_reporting(-1); set_error_handler(function($severity, $message, $file, $line){ @@ -111,18 +123,6 @@ namespace pocketmine { define('pocketmine\PATH', realpath(getcwd()) . DIRECTORY_SEPARATOR); } - if(version_compare("7.0", PHP_VERSION) > 0){ - echo "[CRITICAL] You must use PHP >= 7.0" . PHP_EOL; - echo "[CRITICAL] Please use the installer provided on the homepage." . PHP_EOL; - exit(1); - } - - if(!extension_loaded("pthreads")){ - echo "[CRITICAL] Unable to find the pthreads extension." . PHP_EOL; - echo "[CRITICAL] Please use the installer provided on the homepage." . PHP_EOL; - exit(1); - } - if(!class_exists("ClassLoader", false)){ if(!is_file(\pocketmine\PATH . "src/spl/ClassLoader.php")){ echo "[CRITICAL] Unable to find the PocketMine-SPL library." . PHP_EOL;