Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Moodle and PHP: Difference between revisions

From MoodleDocs
(Moved old content to Moodle and PHP 7.0 details page)
No edit summary
Line 1: Line 1:
PHP7 was released on 3 December 2015 and has significant performance improvement comparing to PHP5. Everybody wants to benefit from it, however the language standards have changed and code written for PHP5 might not work in PHP7. Moodle core and plugins should modify the code so it works the same way on both versions of PHP.
PHP7 was released on 3 December 2015 and has significant performance improvement comparing to PHP5. Everybody wants to benefit from it, however the language standards have changed and code written for PHP5 might not work in PHP7. Moodle core and plugins should modify the code so it works the same way on both versions of PHP.


This page contains description of what has been changed in Moodle to make it work on PHP7 and recommendations to plugin developers. Please see also epic issues MDL-50565 (PHP 7.0), MDL-55120 (PHP 7.1), MDL-60279 (PHP 7.2), MDL-63420 (PHP 7.3) and MDL-66260 (PHP 7.4) that combine all changes that were made in Moodle to ensure PHP7 compatibility. ''(Note: you must be logged in to tracker to see issues in Epics)''
This page contains description of what has been changed in Moodle to make it work on PHP7 and recommendations to plugin developers. Please see also epic issues that combine all the changes that were made in Moodle to ensure PHP compatibility. ''(Note: you must be logged in to tracker to see issues in Epics)''


'''PHP 7.0 can be used with Moodle 3.0.1, Moodle 3.1 and later releases.''' It is also the '''minimum''' supported version for Moodle 3.4. See [[Moodle and PHP 7.0 details]] for details.
MDL-50565 - '''PHP 7.0 can be used with Moodle 3.0.1, Moodle 3.1 and later releases.''' It is also the '''minimum''' supported version for Moodle 3.4. See [[Moodle and PHP 7.0 details]] for details.


'''PHP 7.1 can be used with Moodle 3.2 and later releases.''' It is also the '''minimum''' supported version for Moodle 3.7.
MDL-55120 - '''PHP 7.1 can be used with Moodle 3.2 and later releases.''' It is also the '''minimum''' supported version for Moodle 3.7.


'''PHP 7.2 can be used with Moodle 3.4 and later releases.''' It is also the '''minimum''' supported version for Moodle 3.9.
MDL-60279 - '''PHP 7.2 can be used with Moodle 3.4 and later releases.''' It is also the '''minimum''' supported version for Moodle 3.9.


'''PHP 7.3 can be used with Moodle 3.6.4, Moodle 3.7 and later releases.'''
MDL-63420 - '''PHP 7.3 can be used with Moodle 3.6.4, Moodle 3.7 and later releases.'''


'''PHP 7.4 can be used with Moodle 3.8.3, Moodle 3.9 and later releases.'''
MDL-66260 - '''PHP 7.4 can be used with Moodle 3.8.3, Moodle 3.9 and later releases.'''

Revision as of 17:48, 6 May 2020

PHP7 was released on 3 December 2015 and has significant performance improvement comparing to PHP5. Everybody wants to benefit from it, however the language standards have changed and code written for PHP5 might not work in PHP7. Moodle core and plugins should modify the code so it works the same way on both versions of PHP.

This page contains description of what has been changed in Moodle to make it work on PHP7 and recommendations to plugin developers. Please see also epic issues that combine all the changes that were made in Moodle to ensure PHP compatibility. (Note: you must be logged in to tracker to see issues in Epics)

MDL-50565 - PHP 7.0 can be used with Moodle 3.0.1, Moodle 3.1 and later releases. It is also the minimum supported version for Moodle 3.4. See Moodle and PHP 7.0 details for details.

MDL-55120 - PHP 7.1 can be used with Moodle 3.2 and later releases. It is also the minimum supported version for Moodle 3.7.

MDL-60279 - PHP 7.2 can be used with Moodle 3.4 and later releases. It is also the minimum supported version for Moodle 3.9.

MDL-63420 - PHP 7.3 can be used with Moodle 3.6.4, Moodle 3.7 and later releases.

MDL-66260 - PHP 7.4 can be used with Moodle 3.8.3, Moodle 3.9 and later releases.