3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** * Database creating page * * @package PhpMyAdmin */ /** * Gets some core libraries */ require_once 'libraries/common.inc.php'; require_once 'libraries/mysql_charsets.inc.php'; if (! PMA_DRIZZLE) { include_once 'libraries/replication.inc.php'; } require 'libraries/build_html_for_db.lib.php'; /** * Defines the url to return to in case of error in a sql statement */ $err_url = 'index.php?' . PMA_URL_getCommon(); /** * Builds and executes the db creation sql query */ $sql_query = 'CREATE DATABASE ' . PMA_Util::backquote($_POST['new_db']); if (! empty($_POST['db_collation'])) { list($db_charset) = explode('_', $_POST['db_collation']); if (in_array($db_charset, $mysql_charsets) && in_array($_POST['db_collation'], $mysql_collations[$db_charset]) ) { $sql_query .= ' DEFAULT' . PMA_generateCharsetQueryPart($_POST['db_collation']); } $db_collation_for_ajax = $_POST['db_collation']; unset($db_charset); } $sql_query .= ';'; $result = $GLOBALS['dbi']->tryQuery($sql_query); if (! $result) { $message = PMA_Message::rawError($GLOBALS['dbi']->getError()); // avoid displaying the not-created db name in header or navi panel $GLOBALS['db'] = ''; $GLOBALS['table'] = ''; /** * If in an Ajax request, just display the message with {@link PMA_Response} */ if ($GLOBALS['is_ajax_request'] == true) { $response = PMA_Response::getInstance(); $response->isSuccess(false); $response->addJSON('message', $message); } else { include_once 'index.php'; } } else { $message = PMA_Message::success(__('Database %1$s has been created.')); $message->addParam($_POST['new_db']); $GLOBALS['db'] = $_POST['new_db']; /** * If in an Ajax request, build the output and send it */ if ($GLOBALS['is_ajax_request'] == true) { //Construct the html for the new database, so that it can be appended to // the list of databases on server_databases.php /** * Build the array to be passed to {@link PMA_URL_getCommon} * to generate the links * * @global array $GLOBALS['db_url_params'] * @name $db_url_params */ $db_url_params['db'] = $_POST['new_db']; $is_superuser = $GLOBALS['dbi']->isSuperuser(); $column_order = PMA_getColumnOrder(); $url_query = PMA_URL_getCommon($_POST['new_db']); /** * String that will contain the output HTML * @name $new_db_string */ $new_db_string = '<tr>'; if (empty($db_collation_for_ajax)) { $db_collation_for_ajax = PMA_getServerCollation(); } // $dbstats comes from the create table dialog if (! empty($dbstats)) { $current = array( 'SCHEMA_NAME' => $_POST['new_db'], 'DEFAULT_COLLATION_NAME' => $db_collation_for_ajax, 'SCHEMA_TABLES' => '0', 'SCHEMA_TABLE_ROWS' => '0', 'SCHEMA_DATA_LENGTH' => '0', 'SCHEMA_MAX_DATA_LENGTH' => '0', 'SCHEMA_INDEX_LENGTH' => '0', 'SCHEMA_LENGTH' => '0', 'SCHEMA_DATA_FREE' => '0' ); } else { $current = array( 'SCHEMA_NAME' => $_POST['new_db'], 'DEFAULT_COLLATION_NAME' => $db_collation_for_ajax ); } list($column_order, $generated_html) = PMA_buildHtmlForDb( $current, $is_superuser, $url_query, $column_order, $replication_types, $replication_info ); $new_db_string .= $generated_html; $new_db_string .= '</tr>'; $response = PMA_Response::getInstance(); $response->addJSON('message', $message); $response->addJSON('new_db_string', $new_db_string); $response->addJSON( 'sql_query', PMA_Util::getMessage( null, $sql_query, 'success' ) ); } else { include_once '' . $cfg['DefaultTabDatabase']; } } ?>

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.0130.00616.75
8.3.50.0120.00322.90
8.3.40.0090.00618.97
8.3.30.0110.00419.23
8.3.20.0080.00020.50
8.3.10.0070.00023.56
8.3.00.0050.00319.38
8.2.180.0190.00016.63
8.2.170.0110.00422.96
8.2.160.0100.00320.52
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0160.00326.16
8.2.120.0040.00420.95
8.2.110.0050.00521.98
8.2.100.0080.00317.97
8.2.90.0030.00517.97
8.2.80.0030.00617.97
8.2.70.0040.00417.75
8.2.60.0050.00317.93
8.2.50.0000.00818.07
8.2.40.0040.00418.28
8.2.30.0040.00418.08
8.2.20.0000.00817.91
8.2.10.0040.00418.22
8.2.00.0050.00317.79
8.1.280.0040.01225.92
8.1.270.0090.00023.96
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00018.88
8.1.230.0040.00721.09
8.1.220.0080.00017.74
8.1.210.0040.00418.85
8.1.200.0070.00317.48
8.1.190.0000.00817.35
8.1.180.0030.00518.10
8.1.170.0030.00718.72
8.1.160.0060.00322.02
8.1.150.0000.00818.80
8.1.140.0040.00417.48
8.1.130.0000.00717.75
8.1.120.0040.00417.50
8.1.110.0000.00817.45
8.1.100.0000.00717.55
8.1.90.0000.00917.50
8.1.80.0070.00017.52
8.1.70.0040.00417.39
8.1.60.0080.00017.58
8.1.50.0000.00817.64
8.1.40.0030.00517.57
8.1.30.0000.00817.80
8.1.20.0030.00517.65
8.1.10.0040.00417.70
8.1.00.0040.00417.46
8.0.300.0040.00420.23
8.0.290.0040.00417.00
8.0.280.0070.00018.54
8.0.270.0070.00017.43
8.0.260.0070.00017.30
8.0.250.0040.00417.22
8.0.240.0020.00517.11
8.0.230.0000.00717.01
8.0.220.0000.00717.11
8.0.210.0070.00017.10
8.0.200.0030.00317.05
8.0.190.0000.00717.21
8.0.180.0040.00417.13
8.0.170.0000.00817.18
8.0.160.0040.00417.09
8.0.150.0040.00416.96
8.0.140.0030.00516.97
8.0.130.0000.00813.54
8.0.120.0070.00017.07
8.0.110.0030.00517.08
8.0.100.0030.00517.18
8.0.90.0000.00817.00
8.0.80.0000.01517.10
8.0.70.0030.00617.02
8.0.60.0040.00417.04
8.0.50.0000.00816.97
8.0.30.0070.01217.14
8.0.20.0090.00917.40
8.0.10.0000.00817.11
8.0.00.0140.00616.87
7.4.330.0000.00515.00
7.4.320.0000.00716.69
7.4.300.0060.00016.64
7.4.290.0000.00716.59
7.4.280.0070.00016.61
7.4.270.0040.00416.55
7.4.260.0070.00016.70
7.4.250.0050.00316.59
7.4.240.0040.00316.66
7.4.230.0070.00016.43
7.4.220.0060.01416.70
7.4.210.0030.01316.66
7.4.200.0080.00016.42
7.4.160.0040.01416.50
7.4.150.0070.01017.40
7.4.140.0140.00417.86
7.4.130.0060.01216.73
7.4.120.0070.01016.58
7.4.110.0100.00616.43
7.4.100.0030.01416.67
7.4.90.0060.01216.54
7.4.80.0110.00719.39
7.4.70.0120.00616.73
7.4.60.0120.00616.66
7.4.50.0030.00616.55
7.4.40.0110.00616.34
7.4.30.0130.01016.60
7.4.00.0130.00314.80
7.3.330.0030.00313.05
7.3.320.0030.00313.20
7.3.310.0030.00316.32
7.3.300.0050.00316.44
7.3.290.0000.01516.33
7.3.280.0060.01116.37
7.3.270.0130.01217.40
7.3.260.0130.00316.66
7.3.240.0070.01016.36
7.3.230.0170.00716.48
7.3.210.0110.00716.46
7.3.200.0040.01419.39
7.3.190.0160.00316.52
7.3.180.0060.01016.48
7.3.170.0130.01016.45
7.3.160.0090.00616.53
7.3.120.0040.01414.75
7.3.110.0100.01014.77
7.3.100.0060.00614.80
7.3.90.0070.00714.92
7.3.80.0040.01114.85
7.3.70.0030.00614.66
7.3.60.0070.00714.78
7.3.50.0060.00614.91
7.3.40.0090.00914.73
7.3.30.0030.01014.83
7.3.20.0070.00716.73
7.3.10.0080.00516.67
7.3.00.0080.00816.45
7.2.330.0080.01716.47
7.2.320.0130.00616.62
7.2.310.0120.01216.52
7.2.300.0180.00316.35
7.2.290.0130.01016.64
7.2.250.0030.01815.17
7.2.240.0040.01215.20
7.2.230.0030.01214.94
7.2.220.0090.00615.20
7.2.210.0030.01214.97
7.2.200.0030.01015.11
7.2.190.0030.00615.04
7.2.180.0060.01014.98
7.2.170.0030.01115.13
7.2.130.0000.01416.91
7.2.120.0070.00316.70
7.2.110.0040.00816.65
7.2.100.0070.01116.75
7.2.90.0040.01216.71
7.2.80.0100.00316.66
7.2.70.0070.00716.46
7.2.60.0060.00916.80
7.2.50.0080.00316.84
7.2.40.0040.01116.54
7.2.30.0120.00316.29
7.2.20.0070.00316.56
7.2.10.0060.00916.80
7.2.00.0100.00616.49
7.1.330.0130.00315.72
7.1.320.0060.00815.62
7.1.310.0070.00315.75
7.1.300.0000.01115.82
7.1.290.0040.01115.49
7.1.280.0000.01615.71
7.1.270.0060.00615.78
7.1.260.0070.00315.51
7.1.250.0060.00615.44
7.1.100.0100.00018.09
7.1.70.0000.00817.01
7.1.60.0100.01019.40
7.1.50.0000.01716.82
7.1.00.0030.07722.45
7.0.200.0070.00716.71
7.0.140.0000.07722.01
7.0.60.0370.04020.08
7.0.50.0030.04017.98
7.0.40.0100.07320.25
7.0.30.0230.04320.11
7.0.20.0230.08720.30
7.0.10.0100.08020.17
7.0.00.0130.03320.18
5.6.280.0070.06720.93
5.6.210.0070.07720.73
5.6.200.0100.07718.25
5.6.190.0000.05320.44
5.6.180.0400.04320.61
5.6.170.0370.04320.39
5.6.160.0070.04320.50
5.6.150.0070.03718.16
5.6.140.0100.08018.20
5.6.130.0200.06718.14
5.6.120.0070.07721.05
5.6.110.0070.08020.98
5.6.100.0170.07321.03
5.6.90.0100.06321.00
5.6.80.0130.06020.44
5.5.350.0030.03320.43
5.5.340.0030.04718.06
5.5.330.0070.03720.47
5.5.320.0200.04020.14
5.5.310.0130.04320.51
5.5.300.0000.04318.06
5.5.290.0170.07317.99
5.5.280.0030.05320.82
5.5.270.0100.06320.88
5.5.260.0130.08020.82
5.5.250.0100.08720.71
5.5.240.0230.04720.28
5.4.450.0570.06319.61
5.4.440.0770.05719.42
5.4.430.0100.05719.53
5.4.420.0100.05719.63
5.4.410.0030.06019.25
5.4.400.0200.05018.97
5.4.390.0170.04719.09
5.4.380.0330.05718.73
5.4.370.0400.04718.73
5.4.360.0400.04718.53
5.4.350.0330.05318.60
5.4.340.0270.06018.55
5.4.320.0080.03812.50
5.4.310.0050.04012.49
5.4.300.0090.03812.50
5.4.290.0130.03312.49
5.4.280.0050.03512.39
5.4.270.0090.03612.39
5.4.260.0100.04712.39
5.4.250.0110.03812.39
5.4.240.0080.03412.39
5.4.230.0030.04012.39
5.4.220.0060.03612.38
5.4.210.0040.03712.39
5.4.200.0060.04912.38
5.4.190.0090.03912.38
5.4.180.0080.04512.38
5.4.170.0090.03912.39
5.4.160.0060.03712.39
5.4.150.0060.03612.39
5.4.140.0100.04412.07
5.4.130.0050.04712.06
5.4.120.0060.03912.01
5.4.110.0060.04212.01
5.4.100.0060.03812.01
5.4.90.0040.04212.01
5.4.80.0050.04212.01
5.4.70.0080.04312.01
5.4.60.0060.04012.00
5.4.50.0080.04912.01
5.4.40.0040.04212.00
5.4.30.0060.03911.99
5.4.20.0100.03611.99
5.4.10.0060.03411.99
5.4.00.0080.04411.49
5.3.290.0060.04812.79
5.3.280.0070.03712.71
5.3.270.0040.04112.72
5.3.260.0080.04212.72
5.3.250.0040.04112.72
5.3.240.0060.03712.72
5.3.230.0100.03412.71
5.3.220.0080.04012.68
5.3.210.0050.04012.68
5.3.200.0070.03912.68
5.3.190.0060.03812.68
5.3.180.0060.03712.67
5.3.170.0060.03612.67
5.3.160.0060.03912.67
5.3.150.0030.04112.67
5.3.140.0100.03912.66
5.3.130.0060.03912.66
5.3.120.0080.04212.66
5.3.110.0080.04212.66
5.3.100.0050.03912.12
5.3.90.0060.03712.10
5.3.80.0060.03712.09
5.3.70.0070.03712.09
5.3.60.0080.03612.08
5.3.50.0080.03712.03
5.3.40.0020.04712.03
5.3.30.0070.03711.98
5.3.20.0060.03711.77
5.3.10.0050.03711.73
5.3.00.0060.03611.71
5.2.170.0030.0339.23
5.2.160.0050.0309.23
5.2.150.0060.0299.23
5.2.140.0040.0329.22
5.2.130.0030.0319.18
5.2.120.0060.0279.19
5.2.110.0060.0299.19
5.2.100.0040.0299.19
5.2.90.0060.0289.19
5.2.80.0060.0299.18
5.2.70.0030.0329.18
5.2.60.0100.0329.14
5.2.50.0030.0329.10
5.2.40.0050.0279.08
5.2.30.0050.0289.06
5.2.20.0040.0299.05
5.2.10.0050.0278.98
5.2.00.0060.0278.84
5.1.60.0010.0278.12
5.1.50.0060.0228.12
5.1.40.0030.0258.10
5.1.30.0060.0248.45
5.1.20.0060.0248.47
5.1.10.0070.0238.19
5.1.00.0050.0248.19
5.0.50.0030.0206.70
5.0.40.0040.0196.53
5.0.30.0010.0336.34
5.0.20.0040.0186.32
5.0.10.0060.0176.29
5.0.00.0040.0296.29
4.4.90.0040.0144.78
4.4.80.0020.0164.76
4.4.70.0030.0154.75
4.4.60.0020.0164.75
4.4.50.0040.0144.77
4.4.40.0020.0264.71
4.4.30.0020.0164.76
4.4.20.0020.0164.84
4.4.10.0030.0154.85
4.4.00.0030.0244.76
4.3.110.0030.0164.67
4.3.100.0030.0194.66
4.3.90.0030.0144.63
4.3.80.0020.0254.59
4.3.70.0030.0144.63
4.3.60.0020.0154.63
4.3.50.0020.0174.63
4.3.40.0040.0224.56
4.3.30.0010.0173.37
4.3.20.0020.0193.34
4.3.10.0030.0153.30
4.3.00.0100.0306.98

preferences:
45.67 ms | 401 KiB | 5 Q