includes/class-wp-requirements.php
protected function validate_php( $php ) {
		$result = $required = array();

		foreach ( $php as $type => $data ) {
			switch ( $type ) {
				case 'version':
					$result[ $type ]   = version_compare( phpversion(), $data, $this->version_compare_operator );
					$required[ $type ] = $data;
					break;

				case 'extensions':
					// Check that all required PHP extensions are loaded.
					foreach ( (array) $data as $extension ) {
						if ( $extension && is_string( $extension ) ) {
							$result[ $type ][ $extension ] = extension_loaded( $extension );
							$required[ $type ][]           = $extension;
						}
					}

					break;
			}
		}

		$this->results['php']  = $result;
		$this->required['php'] = $required;
	}
protected function validate_php( $php ) {
		$result = $required = array();

		foreach ( $php as $type => $data ) {
			switch ( $type ) {
				case 'version':
					$result[ $type ]   = version_compare( phpversion(), $data, $this->version_compare_operator );
					$required[ $type ] = $data;
					break;

				case 'extensions':
					// Check that all required PHP extensions are loaded.
					foreach ( (array) $data as $extension ) {
						if ( $extension && is_string( $extension ) ) {
							$result[ $type ][ $extension ] = extension_loaded( $extension );
							$required[ $type ][]           = $extension;
						}
					}

					break;
			}
		}

		$this->results['php']  = $result;
		$this->required['php'] = $required;
	}
protected function validate_php ( $ php ) { $ result = $ required = array ( ) ; foreach ( $ php as $ type => $ data ) { switch ( $ type ) { case 'version' : $ result [ $ type ] = version_compare ( phpversion ( ) , $ data , $ this -> version_compare_operator ) ; $ required [ $ type ] = $ data ; break ; case 'extensions' : // Check that all required PHP extensions are loaded. foreach ( ( array ) $ data as $ extension ) { if ( $ extension && is_string ( $ extension ) ) { $ result [ $ type ] [ $ extension ] = extension_loaded ( $ extension ) ; $ required [ $ type ] [ ] = $ extension ; } } break ; } } $ this -> results [ 'php' ] = $ result ; $ this -> required [ 'php' ] = $ required ; }
Check all PHP related data, like version and extensions

@param array $php PHP requirements.
Check all PHP related data like version and extensions