3v4l.org

run code in 300+ PHP versions simultaneously
<?php $source = <<<EOD <?php include_once "noentry.php"; list(\$get_arr, \$post_arr, \$request_arr) = get_secure_request_params(); \$mode = empty(\$get_arr['mode']) ? 'add' : \$get_arr['mode']; try { if (!in_array(strtolower(\$mode), ['add', 'update'])) { throw new Exception("Error Processing Request", 0); } \$msg = trim(\$get_arr['var_msg']); if (strtolower(\$mode) == 'update') { \$top_header="Update ".'$module_header'; \$id = \$get_arr['$table_primary_key']; \$db_data = \$mfa_db_obj->db->table('$table_name')->select('*')->where('$table_primary_key', \$id)->first(); if(empty(\$db_data)) { \$redirect_url=\$admin_url."index.php?file=sitemap&AX=No"; header("Location:".\$redirect_url); } } } catch (Exception \$e) { \$exception_message=\$e->getMessage(); \$redirect_url=\$admin_url . "{$listing_url}&var_msg=".\$exception_message; header("Location:".\$redirect_url); exit; } include_once "common_css.php"; include_once "common_js.php"; ?> EOD; $tokens = token_get_all($source); foreach ($tokens as $token) { list($id, $text) = $this->get_token($token); $lower_text = strtolower($text); if (T_STRING == $id && isset($alias_list[$lower_text])) { $alias_count[$lower_text] ++; } $return .= $text; } function get_token($token) { if (is_string($token)) { return array($token, $token); } else { return $token; } } echo $return;

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.0040.01118.68
8.3.50.0090.00616.48
8.3.40.0040.01518.84
8.3.30.0040.01518.67
8.3.20.0050.00320.64
8.3.10.0050.00322.09
8.3.00.0080.00022.45
8.2.180.0060.00918.38
8.2.170.0120.00922.96
8.2.160.0070.00722.20
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0000.00726.16
8.2.120.0030.00719.14
8.2.110.0030.00621.11
8.2.100.0080.00417.84
8.2.90.0000.00817.97
8.2.80.0120.00017.97
8.2.70.0040.00417.93
8.2.60.0060.00318.16
8.2.50.0050.00318.10
8.2.40.0040.00421.02
8.2.30.0000.00719.38
8.2.20.0070.00018.16
8.2.10.0040.00419.57
8.2.00.0040.00419.26
8.1.280.0070.00725.92
8.1.270.0000.00823.82
8.1.260.0060.00326.35
8.1.250.0080.00028.09
8.1.240.0060.00323.83
8.1.230.0080.00422.67
8.1.220.0000.00817.74
8.1.210.0030.00518.77
8.1.200.0060.00317.48
8.1.190.0080.00017.48
8.1.180.0000.00818.10
8.1.170.0030.00618.63
8.1.160.0000.00719.06
8.1.150.0040.00418.97
8.1.140.0000.00720.38
8.1.130.0050.00320.16
8.1.120.0040.00317.50
8.1.110.0040.00417.45
8.1.100.0050.00317.48
8.1.90.0040.00417.44
8.1.80.0000.00817.47
8.1.70.0080.00017.61
8.1.60.0000.00917.72
8.1.50.0050.00317.62
8.1.40.0000.00817.66
8.1.30.0030.00617.60
8.1.20.0040.00417.66
8.1.10.0050.00317.68
8.1.00.0050.00317.49
8.0.300.0000.00819.66
8.0.290.0040.00416.88
8.0.280.0070.00018.48
8.0.270.0030.00317.35
8.0.260.0000.00620.17
8.0.250.0000.00716.98
8.0.240.0000.00717.14
8.0.230.0000.00717.00
8.0.220.0030.00317.01
8.0.210.0000.00817.05
8.0.200.0080.00017.16
8.0.190.0000.00917.16
8.0.180.0050.00317.09
8.0.170.0000.00816.95
8.0.160.0070.00017.14
8.0.150.0030.00316.94
8.0.140.0040.00417.02
8.0.130.0030.00313.52
8.0.120.0040.00417.00
8.0.110.0060.00317.02
8.0.100.0080.00017.10
8.0.90.0050.00416.84
8.0.80.0100.00717.04
8.0.70.0040.00417.16
8.0.60.0000.00717.14
8.0.50.0060.00317.02
8.0.30.0190.00617.29
8.0.20.0060.01217.23
8.0.10.0000.00717.06
8.0.00.0120.01216.88
7.4.330.0000.00515.55
7.4.320.0060.00016.59
7.4.300.0000.00616.53
7.4.290.0040.00416.52
7.4.280.0040.00416.51
7.4.270.0000.00716.59
7.4.260.0030.00313.35
7.4.250.0050.00316.59
7.4.240.0020.00516.67
7.4.230.0050.00216.70
7.4.220.0050.00216.67
7.4.210.0070.00816.63
7.4.200.0000.00716.45
7.4.130.0090.01116.68
7.4.120.0120.00616.77
7.4.110.0060.01316.72
7.4.100.0070.01116.62
7.4.90.0120.00616.82
7.4.80.0100.00719.39
7.4.70.0080.01216.59
7.4.60.0100.00716.70
7.4.50.0100.00716.38
7.4.40.0140.00416.80
7.4.10.0100.01014.84
7.4.00.0020.01314.90
7.3.330.0000.00716.51
7.3.320.0030.00313.36
7.3.310.0000.00716.53
7.3.300.0080.00016.42
7.3.290.0040.00416.49
7.3.280.0130.00716.50
7.3.260.0110.00916.55
7.3.240.0110.00916.60
7.3.230.0110.00916.65
7.3.210.0080.01416.80
7.3.200.0100.00716.77
7.3.190.0110.00716.45
7.3.180.0130.00916.41
7.3.170.0080.00916.53
7.3.160.0090.00616.47
7.3.130.0140.00415.08
7.3.120.0110.00714.64
7.3.110.0060.01314.95
7.3.100.0040.01115.07
7.3.90.0060.01114.94
7.3.80.0070.00514.90
7.3.70.0060.00914.94
7.3.60.0070.00814.65
7.3.50.0030.00814.75
7.3.40.0070.00614.88
7.3.30.0040.00914.77
7.3.20.0050.00816.66
7.3.10.0070.00716.74
7.3.00.0050.01116.57
7.2.330.0070.01016.53
7.2.320.0090.00916.82
7.2.310.0130.00616.88
7.2.300.0130.00316.52
7.2.290.0110.00716.56
7.2.260.0090.00915.08
7.2.250.0120.00614.96
7.2.240.0090.00615.07
7.2.230.0060.01314.96
7.2.220.0050.01414.98
7.2.210.0110.00315.13
7.2.200.0060.00715.10
7.2.190.0030.01215.01
7.2.180.0070.00815.20
7.2.170.0070.01015.18
7.2.160.0060.00614.97
7.2.150.0060.00816.91
7.2.140.0060.00816.68
7.2.130.0070.01016.71
7.2.120.0080.00716.76
7.2.110.0060.00916.82
7.2.100.0040.00916.79
7.2.90.0060.00916.83
7.2.80.0070.00816.90
7.2.70.0090.00616.92
7.2.60.0050.00816.72
7.2.50.0070.00716.97
7.2.40.0110.00317.04
7.2.30.0090.00916.75
7.2.20.0090.00916.93
7.2.10.0080.00916.92
7.2.00.0060.00716.86
7.1.330.0070.00716.08
7.1.320.0120.00515.64
7.1.310.0050.00715.58
7.1.300.0080.00815.70
7.1.290.0070.00715.72
7.1.280.0050.01115.53
7.1.270.0040.00915.68
7.1.260.0050.00715.87
7.1.250.0050.00915.66
7.1.240.0070.00915.60
7.1.230.0070.00915.80
7.1.220.0160.00315.82
7.1.210.0120.00515.82
7.1.200.0120.00315.73
7.1.190.0000.01715.89
7.1.180.0130.00515.79
7.1.170.0040.01415.76
7.1.160.0060.01315.65
7.1.150.0080.01015.71
7.1.140.0130.00715.81
7.1.130.0110.00715.70
7.1.120.0100.00615.84
7.1.110.0060.01215.81
7.1.100.0120.00815.92
7.1.90.0110.00715.76
7.1.80.0120.00415.77
7.1.70.0070.00915.81
7.1.60.0140.00215.90
7.1.50.0070.01115.79
7.1.40.0110.00715.82
7.1.30.0120.00815.65
7.1.20.0100.01115.61
7.1.10.0100.00615.64
7.1.00.0120.00515.71
7.0.330.0120.00915.26
7.0.320.0150.00715.29
7.0.310.0150.00815.43
7.0.300.0130.00815.20
7.0.290.0200.00315.45
7.0.280.0210.00515.43
7.0.270.0180.00515.26
7.0.260.0150.00615.34
7.0.250.0180.00415.53
7.0.240.0240.03215.53
7.0.230.0140.00715.61
7.0.220.0170.00315.30
7.0.210.0140.00415.34
7.0.200.0180.00815.33
7.0.190.0110.01115.62
7.0.180.0130.00815.43
7.0.170.0180.00515.38
7.0.160.0120.00715.57
7.0.150.0130.00715.37
7.0.140.0070.01115.41
7.0.130.0090.01215.56
7.0.120.0120.00615.29
7.0.110.0180.00315.47
7.0.100.0110.00715.38
7.0.90.0170.00715.52
7.0.80.0170.00015.19
7.0.70.0160.00615.48
7.0.60.0130.00515.46
7.0.50.0140.00515.51
7.0.40.0160.00515.34
7.0.30.0150.00415.56
7.0.20.0170.00715.32
7.0.10.0230.00015.63
7.0.00.0090.01215.52
5.6.400.0000.01613.94
5.6.390.0090.01114.40
5.6.380.0140.00814.52
5.6.370.0150.00714.52
5.6.360.0080.01614.32
5.6.350.0100.01314.63
5.6.340.0160.01314.25
5.6.330.0170.00414.49
5.6.320.0250.00014.36
5.6.310.0140.01114.21
5.6.300.0190.00014.61
5.6.290.0040.01514.18
5.6.280.0140.00814.28
5.6.270.0120.01014.19
5.6.260.0140.00714.41
5.6.250.0160.00314.59
5.6.240.0080.01214.37
5.6.230.0120.00814.40
5.6.220.0140.00614.51
5.6.210.0130.00914.46
5.6.200.0170.00314.28
5.6.190.0090.01314.48
5.6.180.0130.00714.04
5.6.170.0100.00914.31
5.6.160.0110.01414.54
5.6.150.0150.00914.13
5.6.140.0110.00814.50
5.6.130.0120.00814.04
5.6.120.0120.00814.43
5.6.110.0090.01114.16
5.6.100.0100.01014.27
5.6.90.0100.01014.50
5.6.80.0160.00514.17
5.6.70.0160.01014.41
5.6.60.0210.00614.11
5.6.50.0190.00313.89
5.6.40.0130.01314.30
5.6.30.0140.01114.43
5.6.20.0130.00814.21
5.6.10.0060.01514.14
5.6.00.0150.01214.30
5.5.380.0060.01314.15
5.5.370.0130.00713.98
5.5.360.0120.00814.02
5.5.350.0180.00614.35
5.5.340.0190.00414.21
5.5.330.0190.00914.14
5.5.320.0030.01714.20
5.5.310.0270.00014.45
5.5.300.0170.00314.28
5.5.290.0110.00914.51
5.5.280.0120.00914.59
5.5.270.0170.00314.27
5.5.260.0150.00414.24
5.5.250.0220.00614.29
5.5.240.0080.01114.12
5.5.230.0140.00814.61
5.5.220.0110.00814.28
5.5.210.0210.00414.22
5.5.200.0120.01213.95
5.5.190.0200.00313.99
5.5.180.0090.01514.13
5.5.170.0130.00314.30
5.5.160.0050.01414.38
5.5.150.0080.01214.05
5.5.140.0180.00714.30
5.5.130.0090.01314.35
5.5.120.0120.00914.14
5.5.110.0170.00914.03
5.5.100.0090.01114.50
5.5.90.0170.00314.34
5.5.80.0200.00314.34
5.5.70.0130.00814.16
5.5.60.0140.00714.41
5.5.50.0160.00514.42
5.5.40.0130.00714.20
5.5.30.0180.00914.32
5.5.20.0080.01514.24
5.5.10.0100.01013.99
5.5.00.0130.00613.79
5.4.450.0150.00010.95
5.4.440.0100.00311.11
5.4.430.0100.00511.17
5.4.420.0140.00011.21
5.4.410.0130.00311.36
5.4.400.0120.00811.03
5.4.390.0150.00010.79
5.4.380.0110.00511.07
5.4.370.0110.00610.95
5.4.360.0180.00011.20
5.4.350.0060.01011.16
5.4.340.0110.01610.76
5.4.330.0130.00011.01
5.4.320.0150.00311.18
5.4.310.0140.00511.02
5.4.300.0130.01010.95
5.4.290.0100.00510.99
5.4.280.0120.00611.05
5.4.270.0120.00610.98
5.4.260.0130.00511.25
5.4.250.0060.00911.29
5.4.240.0100.00511.01
5.4.230.0120.00510.83
5.4.220.0050.01110.98
5.4.210.0080.00811.23
5.4.200.0090.00911.05
5.4.190.0100.00510.87
5.4.180.0060.01011.05
5.4.170.0130.00311.11
5.4.160.0120.00410.94
5.4.150.0110.00411.14
5.4.140.0160.00011.29
5.4.130.0100.00511.02
5.4.120.0110.00411.40
5.4.110.0060.00911.13
5.4.100.0100.00510.98
5.4.90.0040.01211.10
5.4.80.0120.00310.93
5.4.70.0140.00011.09
5.4.60.0050.00911.13
5.4.50.0120.00410.77
5.4.40.0090.00611.00
5.4.30.0050.00911.15
5.4.20.0080.00810.88
5.4.10.0150.00411.05
5.4.00.0100.00511.20
5.3.290.0130.00310.75
5.3.280.0000.01410.66
5.3.270.0030.01010.61
5.3.260.0080.00610.68
5.3.250.0100.00310.63
5.3.240.0100.00310.39
5.3.230.0060.00910.68
5.3.220.0140.00010.49
5.3.210.0100.00310.49
5.3.200.0090.00410.56
5.3.190.0040.01310.50
5.3.180.0110.00410.86
5.3.170.0070.00610.83
5.3.160.0080.00410.75
5.3.150.0060.00810.63
5.3.140.0070.00710.77
5.3.130.0060.00710.68
5.3.120.0100.01010.50
5.3.110.0070.00710.48
5.3.100.0100.00310.68
5.3.90.0070.00710.70
5.3.80.0110.00310.38
5.3.70.0130.00010.55
5.3.60.0120.00410.69
5.3.50.0090.00610.53
5.3.40.0110.00310.64
5.3.30.0110.00210.63
5.3.20.0080.00610.64
5.3.10.0110.00310.48
5.3.00.0070.00710.19
5.2.170.0030.0109.66
5.2.160.0110.0049.69
5.2.150.0090.0059.68
5.2.140.0090.0029.66
5.2.130.0060.0069.68
5.2.120.0070.0049.67
5.2.110.0060.0069.66
5.2.100.0080.0059.66
5.2.90.0110.0039.66
5.2.80.0060.0069.66
5.2.70.0100.0039.68
5.2.60.0120.0049.66
5.2.50.0070.0079.66
5.2.40.0070.0109.72
5.2.30.0070.0119.66
5.2.20.0130.0049.66
5.2.10.0100.0009.66
5.2.00.0050.0059.66
5.1.60.0030.0079.66
5.1.50.0090.0009.66
5.1.40.0030.0069.66
5.1.30.0050.0059.66
5.1.20.0080.0039.66
5.1.10.0040.0049.66
5.1.00.0050.0059.66
5.0.50.0070.0009.66
5.0.40.0080.0009.66
5.0.30.0040.0049.66
5.0.20.0050.0039.66
5.0.10.0040.0049.66
5.0.00.0050.0039.66
4.4.90.0060.0029.66
4.4.80.0030.0069.66
4.4.70.0040.0049.66
4.4.60.0040.0039.66
4.4.50.0000.0089.66
4.4.40.0060.0039.66
4.4.30.0070.0009.66
4.4.20.0050.0029.66
4.4.10.0030.0039.66
4.4.00.0020.0049.66
4.3.110.0000.0069.66
4.3.100.0070.0009.66
4.3.90.0030.0039.66
4.3.80.0000.0089.66
4.3.70.0040.0029.66
4.3.60.0000.0079.66
4.3.50.0040.0049.66
4.3.40.0050.0029.66
4.3.30.0030.0039.66
4.3.20.0000.0079.66
4.3.10.0000.0069.66
4.3.00.0000.0069.66

preferences:
37.52 ms | 400 KiB | 5 Q