3v4l.org

run code in 300+ PHP versions simultaneously
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Web cron * * This script looks through all the module directories for cron.php files * and runs them. These files can contain cleanup functions, email functions * or anything that needs to be run on a regular basis. * * This file is best run from cron on the host system (ie outside PHP). * It is strongly recommended to add password protection via admin settings. * * eg wget -q -O /dev/null 'http: *moodle.somewhere.edu/admin/cron.php?password=SeCreT666' * * It is also possible to use CLI script admin/cli/cron.php instead, * you can not call this script from command line any more. * * @package core * @subpackage admin * @copyright 1999 onwards Martin Dougiamas http://dougiamas.com * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ if (defined('STDIN')) { fwrite(STDERR, "ERROR: This script no longer supports CLI, please use admin/cli/cron.php instead\n"); exit(1); } // This is a fake CLI script, it is a really ugly hack which emulates // CLI via web interface, please do not use this hack elsewhere define('CLI_SCRIPT', true); define('WEB_CRON_EMULATED_CLI', 'defined'); // ugly ugly hack, do not use elsewhere please define('NO_OUTPUT_BUFFERING', true); require('../config.php'); require_once($CFG->libdir.'/clilib.php'); require_once($CFG->libdir.'/cronlib.php'); // extra safety //\core\session\manager::write_close(); // check if execution allowed if (!empty($CFG->cronclionly)) { // This script can only be run via the cli. print_error('cronerrorclionly', 'admin'); exit; } // This script is being called via the web, so check the password if there is one. if (!empty($CFG->cronremotepassword)) { $pass = optional_param('password', '', PARAM_RAW); if ($pass != $CFG->cronremotepassword) { // wrong password. print_error('cronerrorpassword', 'admin'); exit; } } // send mime type and encoding @header('Content-Type: text/plain; charset=utf-8'); // we do not want html markup in emulated CLI @ini_set('html_errors', 'off'); // execute the cron cron_run(); ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0150.00618.43
8.3.50.0100.00721.14
8.3.40.0070.00718.84
8.3.30.0100.00720.20
8.3.20.0070.00020.17
8.3.10.0050.00321.95
8.3.00.0050.00322.39
8.2.180.0090.00616.32
8.2.170.0090.00622.96
8.2.160.0030.01020.39
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0050.00219.54
8.2.110.0070.00319.04
8.2.100.0040.00817.91
8.2.90.0080.00018.22
8.2.80.0050.00317.97
8.2.70.0040.00418.05
8.2.60.0040.00418.03
8.2.50.0000.00818.10
8.2.40.0060.00320.61
8.2.30.0040.00419.26
8.2.20.0070.00017.80
8.2.10.0000.00717.77
8.2.00.0070.00017.75
8.1.280.0090.01225.92
8.1.270.0040.00424.66
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00620.71
8.1.230.0080.00420.92
8.1.220.0000.00917.74
8.1.210.0040.00418.77
8.1.200.0030.00617.48
8.1.190.0060.00317.22
8.1.180.0090.00018.10
8.1.170.0040.00418.64
8.1.160.0030.00518.79
8.1.150.0090.00018.56
8.1.140.0040.00417.29
8.1.130.0030.00317.79
8.1.120.0000.00717.46
8.1.110.0040.00417.25
8.1.100.0000.00917.30
8.1.90.0000.00817.45
8.1.80.0070.00017.42
8.1.70.0030.00317.46
8.1.60.0040.00417.54
8.1.50.0030.00617.46
8.1.40.0040.00417.50
8.1.30.0040.00417.50
8.1.20.0040.00417.60
8.1.10.0040.00417.46
8.1.00.0050.00217.47
8.0.300.0030.00619.94
8.0.290.0040.00416.63
8.0.280.0000.00718.25
8.0.270.0080.00317.14
8.0.260.0030.00316.81
8.0.250.0000.00716.90
8.0.240.0040.00416.89
8.0.230.0030.00316.99
8.0.220.0070.00016.90
8.0.210.0000.00816.89
8.0.200.0030.00317.01
8.0.190.0060.00616.87
8.0.180.0100.00016.92
8.0.170.0060.00316.84
8.0.160.0000.00716.95
8.0.150.0040.00416.75
8.0.140.0050.00316.88
8.0.130.0030.00313.30
8.0.120.0040.00416.72
8.0.110.0040.00416.83
8.0.100.0050.00216.98
8.0.90.0070.00016.75
8.0.80.0120.00316.81
8.0.70.0000.00816.72
8.0.60.0000.00716.82
8.0.50.0050.00216.74
8.0.30.0060.01317.07
8.0.20.0080.00917.40
8.0.10.0040.00416.98
8.0.00.0070.01116.78
7.4.330.0030.00315.00
7.4.320.0000.00616.47
7.4.300.0030.00316.48
7.4.290.0030.00516.49
7.4.280.0070.00016.56
7.4.270.0050.00216.52
7.4.260.0030.00316.54
7.4.250.0040.00416.52
7.4.240.0020.00516.45
7.4.230.0040.00416.27
7.4.220.0100.01316.64
7.4.210.0070.00816.53
7.4.200.0070.00016.36
7.4.190.0070.00016.43
7.4.160.0100.01016.52
7.4.150.0080.00817.40
7.4.140.0140.00517.86
7.4.130.0040.01416.52
7.4.120.0120.00816.43
7.4.110.0060.01616.35
7.4.100.0100.00716.49
7.4.90.0130.00316.60
7.4.80.0170.00319.39
7.4.70.0090.01216.50
7.4.60.0030.01316.34
7.4.50.0000.00816.61
7.4.40.0120.00022.77
7.4.30.0130.00616.46
7.4.00.0000.01714.81
7.3.330.0000.00513.22
7.3.320.0000.00513.07
7.3.310.0040.00416.29
7.3.300.0070.00016.14
7.3.290.0090.00616.26
7.3.280.0060.01116.25
7.3.270.0100.00717.40
7.3.260.0070.01416.40
7.3.250.0110.00916.29
7.3.240.0060.01016.32
7.3.230.0090.00916.42
7.3.210.0060.01516.27
7.3.200.0030.01319.39
7.3.190.0060.01216.35
7.3.180.0120.00916.45
7.3.170.0030.01216.60
7.3.160.0050.01016.37
7.3.120.0060.00914.68
7.2.330.0120.00616.65
7.2.320.0130.00916.53
7.2.310.0080.00816.38
7.2.300.0000.01916.31
7.2.290.0110.00616.67
7.2.00.0000.01419.45
7.1.100.0050.00517.78
7.1.70.0000.01017.04
7.1.60.0040.01819.29
7.1.50.0110.01116.50
7.1.00.0070.03022.44
7.0.200.0040.00814.83
7.0.140.0100.06721.98
7.0.60.0300.06019.95
7.0.50.0330.05720.49
7.0.40.0230.04720.47
7.0.30.0170.05320.33
7.0.20.0070.06320.34
7.0.10.0130.05720.24
7.0.00.0170.05720.45
5.6.280.0030.06720.78
5.6.210.0030.06320.40
5.6.200.0230.04720.96
5.6.190.0030.06321.18
5.6.180.0030.06720.96
5.6.170.0100.06020.99
5.6.160.0130.05320.86
5.6.150.0130.05721.05
5.6.140.0000.06321.20
5.6.130.0130.08721.08
5.6.120.0170.07721.08
5.6.110.0030.07721.19
5.6.100.0030.07321.09
5.6.90.0130.06020.93
5.6.80.0130.05020.59
5.6.70.0170.06320.48
5.6.60.0100.05320.42
5.6.50.0200.04320.41
5.6.40.0230.07020.22
5.6.30.0130.05320.44
5.6.20.0170.05020.54
5.6.10.0100.05320.30
5.6.00.0200.04720.55
5.5.350.0070.06320.38
5.5.340.0100.06320.85
5.5.330.0130.06320.95
5.5.320.0170.07020.91
5.5.310.0130.07320.95
5.5.300.0130.07020.98
5.5.290.0270.05320.89
5.5.280.0130.06320.87
5.5.270.0200.05720.89
5.5.260.0130.05721.01
5.5.250.0100.06320.79
5.5.240.0170.04320.36
5.5.230.0170.05020.39
5.5.220.0070.05720.16
5.5.210.0100.05320.37
5.5.200.0100.05320.25
5.5.190.0170.05320.26
5.5.180.0100.05720.32
5.5.160.0100.05720.30
5.5.150.0070.06020.36
5.5.140.0100.05320.30
5.5.130.0030.06020.10
5.5.120.0200.07020.16
5.5.110.0200.06720.32
5.5.100.0130.07019.97
5.5.90.0100.06319.98
5.5.80.0100.07020.16
5.5.70.0130.06720.05
5.5.60.0130.07020.13
5.5.50.0100.05320.20
5.5.40.0130.06019.99
5.5.30.0070.06320.21
5.5.20.0170.05720.05
5.5.10.0130.07019.92
5.5.00.0170.05320.01
5.4.450.0130.07319.35
5.4.440.0100.08019.35
5.4.430.0100.05319.24
5.4.420.0130.05019.51
5.4.410.0070.05319.13
5.4.400.0030.06018.99
5.4.390.0070.05719.18
5.4.380.0130.04719.02
5.4.370.0100.06719.00
5.4.360.0170.07718.94
5.4.350.0130.06019.00
5.4.340.0070.05319.02
5.4.320.0270.04319.17
5.4.310.0270.05319.14
5.4.300.0030.05719.07
5.4.290.0130.04719.04
5.4.280.0130.05719.11
5.4.270.0200.06019.04
5.4.260.0100.05019.07
5.4.250.0070.07719.01
5.4.240.0000.09019.16
5.4.230.0130.04719.01
5.4.220.0170.06718.96
5.4.210.0200.07018.95
5.4.200.0030.05319.01
5.4.190.0170.06719.16
5.4.180.0100.05018.94
5.4.170.0100.05018.97
5.4.160.0130.06018.97
5.4.150.0130.07019.14
5.4.140.0100.04716.15
5.4.130.0200.06016.14
5.4.120.0070.05716.61
5.4.110.0130.06716.49
5.4.100.0070.06016.48
5.4.90.0100.05016.48
5.4.80.0130.06316.28
5.4.70.0230.06316.18
5.4.60.0170.04716.45
5.4.50.0070.07016.46
5.4.40.0270.06716.51
5.4.30.0030.05016.25
5.4.20.0130.07316.20
5.4.10.0200.05716.22
5.4.00.0130.06016.00
5.3.290.0170.05014.59
5.3.280.0030.07314.61
5.3.270.0100.05314.46
5.3.260.0100.05314.54
5.3.250.0130.05714.62
5.3.240.0100.07314.55
5.3.230.0070.05714.40
5.3.220.0030.06314.50
5.3.210.0000.06314.52
5.3.200.0100.05014.46
5.3.190.0130.04314.40
5.3.180.0070.05714.58
5.3.170.0200.05014.51
5.3.160.0070.05014.47
5.3.150.0130.06714.48
5.3.140.0070.07314.43
5.3.130.0130.06714.48
5.3.120.0170.07314.59
5.3.110.0170.06314.48
5.3.100.0100.07714.00
5.3.90.0100.05313.91
5.3.80.0170.04314.06
5.3.70.0100.04714.02
5.3.60.0130.06013.87
5.3.50.0030.06713.85
5.3.40.0070.07313.74
5.3.30.0070.06713.78
5.3.20.0130.06713.64
5.3.10.0000.05313.68
5.3.00.0130.07013.66
5.2.170.0100.05711.16
5.2.160.0100.04311.17
5.2.150.0030.04711.18
5.2.140.0200.04011.09
5.2.130.0030.06011.06
5.2.120.0100.05311.08
5.2.110.0030.04310.90
5.2.100.0030.06310.98
5.2.90.0130.05310.90
5.2.80.0100.05011.11
5.2.70.0070.04311.04
5.2.60.0130.04010.96
5.2.50.0070.05710.98
5.2.40.0130.03711.01
5.2.30.0170.05310.77
5.2.20.0000.04310.98
5.2.10.0030.04710.91
5.2.00.0070.04310.73
5.1.60.0070.05010.16
5.1.50.0030.0309.99
5.1.40.0030.0539.97
5.1.30.0030.06010.37
5.1.20.0030.05710.35
5.1.10.0070.05010.04
5.1.00.0000.06010.11
5.0.50.0000.0408.48
5.0.40.0000.0438.49
5.0.30.0000.0478.27
5.0.20.0000.0408.29
5.0.10.0070.0408.23
5.0.00.0030.0538.00
4.4.90.0000.0177.36
4.4.80.0000.0177.36
4.4.70.0030.0207.36
4.4.60.0030.0377.36
4.4.50.0030.0307.36
4.4.40.0030.0277.36
4.4.30.0070.0337.36
4.4.20.0030.0237.36
4.4.10.0000.0237.36
4.4.00.0030.0407.36
4.3.110.0030.0337.36
4.3.100.0030.0177.36
4.3.90.0030.0207.36
4.3.80.0030.0477.36
4.3.70.0030.0207.36
4.3.60.0030.0277.36
4.3.50.0070.0177.36
4.3.40.0000.0337.36
4.3.30.0030.0207.36
4.3.20.0000.0207.36
4.3.10.0030.0307.36
4.3.00.0070.0277.36

preferences:
40.68 ms | 400 KiB | 5 Q