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;
	}