define( 'MW_API', true );
// Bail if PHP is too low
-if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) {
+if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.2' ) < 0 ) {
// We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
require dirname( __FILE__ ) . '/includes/PHPVersionError.php';
wfPHPVersionError( 'api.php' );
$mwVersion = '1.24';
$minimumVersionPHP = '5.3.2';
- $phpVersion = phpversion();
+ $phpVersion = PHP_VERSION;
$protocol = isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0';
$message = "MediaWiki $mwVersion requires at least "
. "PHP version $minimumVersionPHP, you are using PHP $phpVersion.";
$data['generator'] = "MediaWiki {$config->get( 'Version' )}";
- $data['phpversion'] = phpversion();
+ $data['phpversion'] = PHP_VERSION;
$data['phpsapi'] = PHP_SAPI;
$data['dbtype'] = $config->get( 'DBtype' );
$data['dbversion'] = $this->getDB()->getServerVersion();
public function doEnvironmentChecks() {
// Php version has already been checked by entry scripts
// Show message here for information purposes
- $this->showMessage( 'config-env-php', phpversion() );
+ $this->showMessage( 'config-env-php', PHP_VERSION );
$good = true;
// Must go here because an old version of PCRE can prevent other checks from completing
# has structures (try/catch, foo()->bar(), etc etc) which throw parse errors in
# PHP 4. Setup.php and ObjectCache.php have structures invalid in PHP 5.0 and
# 5.1, respectively.
-if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) {
+if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.2' ) < 0 ) {
// We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
require dirname( __FILE__ ) . '/includes/PHPVersionError.php';
wfPHPVersionError( 'index.php' );
*/
// Bail if PHP is too low
-if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) {
+if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.2' ) < 0 ) {
// We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
require dirname( __FILE__ ) . '/includes/PHPVersionError.php';
wfPHPVersionError( 'load.php' );
* @ingroup Maintenance
*/
-if ( !function_exists( 'version_compare' ) || ( version_compare( phpversion(), '5.3.2' ) < 0 ) ) {
+if ( !function_exists( 'version_compare' ) || ( version_compare( PHP_VERSION, '5.3.2' ) < 0 ) ) {
require_once dirname( __FILE__ ) . '/../includes/PHPVersionError.php';
wfPHPVersionError( 'cli' );
}
* @ingroup Maintenance
*/
-if ( !function_exists( 'version_compare' ) || ( version_compare( phpversion(), '5.3.2' ) < 0 ) ) {
+if ( !function_exists( 'version_compare' ) || ( version_compare( PHP_VERSION, '5.3.2' ) < 0 ) ) {
require dirname( __FILE__ ) . '/../includes/PHPVersionError.php';
wfPHPVersionError( 'cli' );
}
*/
// Bail if PHP is too low
-if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.3.2' ) < 0 ) {
+if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.2' ) < 0 ) {
// We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+
require dirname( dirname( __FILE__ ) ) . '/includes/PHPVersionError.php';
wfPHPVersionError( 'mw-config/index.php' );
array(
'tr_date' => $this->db->timestamp(),
'tr_mw_version' => $this->version,
- 'tr_php_version' => phpversion(),
+ 'tr_php_version' => PHP_VERSION,
'tr_db_version' => $this->db->getServerVersion(),
'tr_uname' => php_uname()
),