3v4l.org

run code in 300+ PHP versions simultaneously
<?php // SpaceBoard - the board with support for spaces // Copyright (C) 2012 GlitchMr // We have to expect PHP 4.0.0 without extensions until end of the tests. // Hack protection if (file_exists('../storage/sql.php')) { die('Please delete <kbd>storage/sql.php</kbd> to continue.'); } session_start(); if (!empty($_GET['ignore_errors'])) { $_SESSION['space_ignore_errors'] = true; } $errors = array(); // If version_compare doesn't exist then you're seriously screwed. if (!function_exists('version_compare') || version_compare(PHP_VERSION, '5.2.4', '<') ) { $errors[] = 'You\'re using PHP ' . htmlspecialchars(PHP_VERSION) . ' but you need at least PHP 5.2.4'; } if (!class_exists('mysqli')) { $errors[] = '<code>mysqli</code> not found, but it\'s required.'; } if (!function_exists('mb_strlen')) { $errors[] = 'Multibyte String for PHP is not installed. It\'s required.'; } if (!function_exists('preg_match')) { $errors[] = 'Your PHP installation doesn\'t have PCRE. It\'s required ' . 'for SpaceBoard to work.'; } if (ini_get('register_globals')) { $errors[] = 'Your server has <a href="http://www.php.net/manual/en/' . 'security.globals.php">register_globals</a> enabled. It\'s' . ' unsupported and attempting to continue may result your ' . 'board being hacked.'; } if (!file_exists('../storage/plugins')) { // Make basic file storage for tests @mkdir('../storage'); @mkdir('../storage/3rdparty'); @mkdir('../storage/3rdparty/twig'); @mkdir('../storage/plugins'); } // If it doesn't exist after creation something went wrong. if (!file_exists('../storage/plugins')) { $errors[] = 'Your filesystem isn\'t writable. Make <kbd>storage</kbd> ' . 'directory in main directory of your board and give it ' . 'read and write rights.'; } if ($errors && empty($_SESSION['space_ignore_errors'])) { echo '<!DOCTYPE html><title>Runtime error!</title>', '<div style="border-top: 5px solid red;', 'border-bottom: 5px solid red;', 'background: #FEE;', 'padding: 5px">', '<p>Sorry, but your server cannot run SpaceBoard.<ul>'; foreach ($errors as $error) { echo "<li>$error"; } echo '</ul><p>Or, if you really want to continue you may ', '<a href="?ignore_errors=1">continue</a>. You have been warned ', 'through. Don\'t complain if your installation won\'t work.</div>'; exit; } // If we are at this point that means everything should be fine. We may load // installer and write stuff without bothering about lack of compatibility. chdir('..'); require_once 'lib/basics.php'; require_once 'lib/twig.php'; require_once 'lib/i18n.php'; require_once 'lib/functions.php'; require_once 'lib/sql.php'; // Initialize $error variable. $error = null; // The board doesn't exist, but we should know the theme. $theme = 'spaceboard'; // Also, language should be set to English $lang = 'en'; $fields = array( 'dbserver' => array( 'name' => __('install_server'), 'hint' => __('install_server_hint'), 'type' => 'text', 'value' => issetor($_POST['dbserver'], 'localhost'), ), 'dbname' => array( 'name' => __('install_name'), 'type' => 'text', 'value' => issetor($_POST['dbname'], ''), ), 'dbuser' => array( 'name' => __('install_user'), 'type' => 'text', 'value' => issetor($_POST['dbuser'], ''), ), 'dbpass' => array( 'name' => __('install_password'), 'type' => 'password', 'value' => issetor($_POST['dbpass'], ''), ), 'dbprefix' => array( 'name' => __('install_prefix'), 'hint' => __('install_prefix_hint'), 'type' => 'text', 'value' => issetor($_POST['dbprefix'], 'space_'), ), 'dbport' => array( 'name' => __('install_port'), 'hint' => __('install_port_hint'), 'type' => 'number', 'value' => issetor($_POST['dbport'], 3306), ), 'submit' => array( 'name' => __('install_submit'), 'type' => 'submit', 'value' => __('install_submit_button'), ), );

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.0120.00918.43
8.3.50.0130.00521.98
8.3.40.0120.00318.94
8.3.30.0040.01119.21
8.3.20.0040.00420.28
8.3.10.0000.00823.44
8.3.00.0000.00822.52
8.2.180.0160.00618.54
8.2.170.0110.00722.96
8.2.160.0000.01422.02
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0000.00826.16
8.2.120.0050.00317.63
8.2.110.0080.00022.26
8.2.100.0100.00717.83
8.2.90.0000.00819.34
8.2.80.0000.00918.18
8.2.70.0030.00617.75
8.2.60.0080.00018.05
8.2.50.0030.00518.07
8.2.40.0030.00618.28
8.2.30.0040.00418.30
8.2.20.0040.00417.91
8.2.10.0030.00517.89
8.2.00.0030.00618.02
8.1.280.0120.00325.92
8.1.270.0040.00423.88
8.1.260.0080.00026.35
8.1.250.0070.00728.09
8.1.240.0060.00323.91
8.1.230.0060.00619.28
8.1.220.0050.00317.91
8.1.210.0000.00818.77
8.1.200.0000.00917.35
8.1.190.0040.00417.65
8.1.180.0030.00518.10
8.1.170.0000.00918.63
8.1.160.0000.00822.12
8.1.150.0040.00418.71
8.1.140.0040.00417.57
8.1.130.0000.00717.95
8.1.120.0020.00517.59
8.1.110.0040.00417.46
8.1.100.0030.00617.65
8.1.90.0000.00717.57
8.1.80.0000.00717.63
8.1.70.0030.00317.55
8.1.60.0080.00017.75
8.1.50.0000.00817.63
8.1.40.0030.00517.58
8.1.30.0030.00617.64
8.1.20.0060.00317.77
8.1.10.0030.00617.59
8.1.00.0090.00017.68
8.0.300.0000.00818.77
8.0.290.0070.00017.05
8.0.280.0070.00018.49
8.0.270.0080.00017.38
8.0.260.0030.00616.95
8.0.250.0070.00017.14
8.0.240.0110.00017.11
8.0.230.0040.00417.01
8.0.220.0050.00317.04
8.0.210.0040.00417.04
8.0.200.0000.00717.07
8.0.190.0030.00617.11
8.0.180.0040.00417.06
8.0.170.0000.00817.11
8.0.160.0040.00417.13
8.0.150.0000.00816.93
8.0.140.0080.00017.07
8.0.130.0030.00313.48
8.0.120.0000.00817.03
8.0.110.0070.00017.07
8.0.100.0000.00816.99
8.0.90.0000.00717.13
8.0.80.0100.00617.03
8.0.70.0040.00417.04
8.0.60.0080.00017.00
8.0.50.0000.00717.13
8.0.30.0150.00417.41
8.0.20.0100.00917.41
8.0.10.0000.00817.24
8.0.00.0090.01117.03
7.4.330.0050.00015.09
7.4.320.0030.00316.74
7.4.300.0070.00016.54
7.4.290.0000.00716.64
7.4.280.0000.00716.71
7.4.270.0030.00416.73
7.4.260.0030.00516.64
7.4.250.0020.00516.50
7.4.240.0060.00216.65
7.4.230.0040.00416.73
7.4.220.0160.01016.66
7.4.210.0050.00916.70
7.4.200.0020.00516.68
7.4.190.0040.00416.68
7.4.160.0160.00416.70
7.4.150.0100.00717.40
7.4.140.0110.00817.86
7.4.130.0160.00116.77
7.4.120.0140.00616.86
7.4.110.0100.01416.56
7.4.100.0130.00716.54
7.4.90.0090.00916.63
7.4.80.0060.01216.70
7.4.70.0130.00916.49
7.4.60.0070.01016.75
7.4.50.0000.00516.50
7.4.40.0000.01522.77
7.4.30.0110.00716.93
7.4.00.0100.00615.00
7.3.330.0060.00013.25
7.3.320.0030.00313.33
7.3.310.0070.00016.58
7.3.300.0000.00716.40
7.3.290.0080.01316.47
7.3.280.0080.01016.51
7.3.270.0000.02017.40
7.3.260.0100.01016.58
7.3.250.0110.00716.62
7.3.240.0070.01116.67
7.3.230.0090.00916.71
7.3.210.0220.01416.60
7.3.200.0060.01219.39
7.3.190.0060.01616.55
7.3.180.0140.01116.57
7.3.170.0030.01316.75
7.3.160.0100.00716.66
7.3.120.0140.00315.21
7.2.330.0030.01916.74
7.2.320.0090.00916.75
7.2.310.0090.01216.55
7.2.300.0100.00616.98
7.2.290.0070.01616.72
7.2.60.0070.00316.70
7.2.00.0030.01019.26
7.1.200.0050.00516.04
7.1.100.0040.01118.20
7.1.70.0060.00317.20
7.1.60.0160.00619.24
7.1.50.0170.00334.83
7.1.00.0030.09322.44
7.0.200.0040.01116.47
7.0.140.0000.07722.00
7.0.60.0070.08720.10
7.0.50.0200.07017.81
7.0.40.0100.08020.07
7.0.30.0300.05320.18
7.0.20.0470.07320.30
7.0.10.0330.09020.04
7.0.00.0100.04319.99
5.6.280.0030.07321.13
5.6.210.0100.08020.66
5.6.200.0170.07318.22
5.6.190.0000.09720.33
5.6.180.3500.05020.54
5.6.170.0230.03720.42
5.6.160.0100.08720.47
5.6.150.0030.04018.21
5.6.140.0130.07718.21
5.6.130.0000.04718.16
5.6.120.0000.04321.01
5.6.110.0100.08321.00
5.6.100.0130.04321.10
5.6.90.0200.06021.04
5.6.80.0030.09320.30
5.6.70.4330.04020.52
5.5.350.0170.08020.34
5.5.340.0030.05317.92
5.5.330.0070.07020.13
5.5.320.0270.07320.36
5.5.310.0200.08720.28
5.5.300.0030.07018.05
5.5.290.0000.07017.95
5.5.280.0070.03720.82
5.5.270.0000.06720.98
5.5.260.0030.04320.90
5.5.250.0030.04020.57
5.5.240.0070.06320.34
5.4.450.0730.06019.32
5.4.440.0800.05319.32
5.4.430.0800.07319.43
5.4.420.0130.05319.54
5.4.410.0170.05318.76
5.4.400.0330.04718.81
5.4.390.0230.04318.52
5.4.380.0130.05318.68
5.4.370.0070.04018.58
5.4.360.0200.03718.69
5.4.350.0030.03912.02
5.4.340.0090.03912.02
5.4.320.0050.03712.50
5.4.310.0040.04212.50
5.4.300.0050.03712.51
5.4.290.0070.03712.50
5.4.280.0110.04312.40
5.4.270.0070.03612.39
5.4.260.0080.03612.40
5.4.250.0090.03712.40
5.4.240.0060.04812.40
5.4.230.0060.03912.39
5.4.220.0070.03712.39
5.4.210.0070.03612.39
5.4.200.0090.04412.39
5.4.190.0030.03912.39
5.4.180.0030.04012.38
5.4.170.0150.04512.38
5.4.160.0130.04812.38
5.4.150.0140.04712.38
5.4.140.0150.04512.06
5.4.130.0150.04412.05
5.4.120.0160.04112.00
5.4.110.0160.04612.00
5.4.100.0190.04112.00
5.4.90.0330.08812.00
5.4.80.0180.04312.00
5.4.70.0150.04211.99
5.4.60.0150.04912.00
5.4.50.0110.04612.00
5.4.40.0220.04111.98
5.4.30.0280.09211.98
5.4.20.0210.03811.98
5.4.10.0190.04311.98
5.4.00.0150.04611.47
5.3.290.0110.03812.80
5.3.280.0060.03712.71
5.3.270.0200.04412.72
5.3.260.0140.05012.71
5.3.250.0180.04512.72
5.3.240.0190.04412.72
5.3.230.0210.04512.71
5.3.220.0280.06412.68
5.3.210.0220.04012.68
5.3.200.0190.04312.68
5.3.190.0140.04912.68
5.3.180.0220.04012.67
5.3.170.0200.04212.67
5.3.160.0200.04612.68
5.3.150.0360.09312.67
5.3.140.0190.04212.66
5.3.130.0210.04312.66
5.3.120.0240.04612.66
5.3.110.0170.04812.66
5.3.100.0220.04112.13
5.3.90.0170.04512.11
5.3.80.0200.04312.10
5.3.70.0210.04212.10
5.3.60.0160.04812.09
5.3.50.0230.04412.04
5.3.40.0310.09612.04
5.3.30.0200.03912.00
5.3.20.0150.04811.78
5.3.10.0180.04211.74
5.3.00.0150.04311.73
5.2.170.0120.0389.25
5.2.160.0150.0359.24
5.2.150.0110.0379.24
5.2.140.0150.0359.24
5.2.130.0150.0349.20
5.2.120.0140.0369.20
5.2.110.0120.0369.20
5.2.100.0150.0339.20
5.2.90.0220.0559.20
5.2.80.0130.0349.19
5.2.70.0160.0339.18
5.2.60.0140.0359.14
5.2.50.0190.0309.11
5.2.40.0160.0339.09
5.2.30.0330.0769.06
5.2.20.0130.0379.05
5.2.10.0190.0319.00
5.2.00.0150.0328.85
5.1.60.0080.0328.14
5.1.50.0120.0308.14
5.1.40.0090.0318.13
5.1.30.0180.0258.46
5.1.20.0130.0308.50
5.1.10.0160.0308.21
5.1.00.0130.0308.21
5.0.50.0110.0236.68
5.0.40.0130.0206.55
5.0.30.0090.0376.37
5.0.20.0120.0226.33
5.0.10.0070.0256.31
5.0.00.0120.0346.30
4.4.90.0090.0194.78
4.4.80.0090.0184.75
4.4.70.0110.0194.75
4.4.60.0110.0184.76
4.4.50.0080.0194.77
4.4.40.0070.0324.71
4.4.30.0060.0204.76
4.4.20.0080.0214.85
4.4.10.0070.0194.84
4.4.00.0080.0314.76
4.3.110.0080.0184.66
4.3.100.0090.0164.66
4.3.90.0320.0554.63
4.3.80.0100.0254.60
4.3.70.0070.0184.63
4.3.60.0060.0204.63
4.3.50.0090.0154.63
4.3.40.0090.0264.57
4.3.30.0040.0203.38
4.3.20.0070.0173.36
4.3.10.0060.0173.32
4.3.00.0170.0208.15

preferences:
43.08 ms | 401 KiB | 5 Q