Replace phpversion() with PHP_VERSION

According to my tests, we'll speed things by almost 2.8 seconds every 1 million calls, dude.
This commit is contained in:
ozh 2017-04-20 09:33:42 +02:00
parent dea4ace0c6
commit 51a3d3beab
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ if ( !yourls_check_database_version() ) {
if ( !yourls_check_php_version() ) {
$error[] = yourls_s( '%s version is too old. Ask your server admin for an upgrade.', 'PHP' );
yourls_debug_log( 'PHP version: ' . phpversion() );
yourls_debug_log( 'PHP version: ' . PHP_VERSION );
}
// Is YOURLS already installed ?

View File

@ -296,7 +296,7 @@ function yourls_check_core_version() {
'failed_attempts' => $checks->failed_attempts,
'yourls_site' => defined( 'YOURLS_SITE' ) ? YOURLS_SITE : 'unknown',
'yourls_version' => defined( 'YOURLS_VERSION' ) ? YOURLS_VERSION : 'unknown',
'php_version' => phpversion(),
'php_version' => PHP_VERSION,
'mysql_version' => $ydb->mysql_version(),
'locale' => yourls_get_locale(),