emit_performance_warnings(): Log a warning when using a PHP debug build

This commit is contained in:
Dylan K. Taylor 2021-08-11 20:14:03 +01:00
parent cd53fa162b
commit 28bfe9fbb4
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -127,6 +127,9 @@ namespace pocketmine {
* @return void
*/
function emit_performance_warnings(\Logger $logger){
if(PHP_DEBUG !== 0){
$logger->warning("This PHP binary was compiled in debug mode. This has a major impact on performance.");
}
if(extension_loaded("xdebug")){
$logger->warning("Xdebug extension is enabled. This has a major impact on performance.");
}