SystemRequirements.php 628 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Drupal\system;
  3. /**
  4. * Class for helper methods used for the system requirements.
  5. */
  6. class SystemRequirements {
  7. /**
  8. * Determines whether the passed in PHP version disallows multiple statements.
  9. *
  10. * @param string $phpversion
  11. *
  12. * @return bool
  13. */
  14. public static function phpVersionWithPdoDisallowMultipleStatements($phpversion) {
  15. // PDO::MYSQL_ATTR_MULTI_STATEMENTS was introduced in PHP versions 5.5.21
  16. // and 5.6.5.
  17. return (version_compare($phpversion, '5.5.21', '>=') && version_compare($phpversion, '5.6.0', '<'))
  18. || version_compare($phpversion, '5.6.5', '>=');
  19. }
  20. }