Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.3.x will end 7 October 2024 (12 months).
  • Bug fixes for security issues in 4.3.x will end 21 April 2025 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.2.x is supported too.

Differences Between: [Versions 310 and 403] [Versions 311 and 403] [Versions 39 and 403] [Versions 400 and 403] [Versions 401 and 403]

A set of PHP-compatible convenience functions to check Moodle minimum PHP version in a unified place. PLEASE NOTE: This file is made to be both php-version compatible and without requirement on any moodle functions or installation so it can be used in installer or incompatible PHP versions.

Copyright: 2017 Dan Poltawski <dan@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 76 lines (3 kb)
Included or required: 4 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 functions


Functions that are not part of a class:

moodle_require_minimum_php_version()   X-Ref
Require our minimum php version or halt execution if requirement not met.

return: void Execution is halted if version is not met.

moodle_minimum_php_version_is_met($haltexecution = false)   X-Ref
Tests the current PHP version against Moodle's minimum requirement. When requirement
is not met returns false or halts execution depending $haltexecution param.

param: bool $haltexecution Should execution be halted when requirement not met? Defaults to false.
return: bool returns true if requirement is met (false if not)