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) = 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.0140.00418.43
8.3.50.0090.00916.39
8.3.40.0110.00718.87
8.3.30.0080.00818.92
8.3.20.0040.00420.51
8.3.10.0000.00821.92
8.3.00.0080.00022.45
8.2.180.0090.00618.66
8.2.170.0130.00722.96
8.2.160.0070.00722.12
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00426.16
8.2.110.0110.00020.66
8.2.100.0040.00717.99
8.2.90.0050.00618.00
8.2.80.0000.00818.18
8.2.70.0000.00818.05
8.2.60.0040.00418.28
8.2.50.0060.00318.10
8.2.40.0000.00820.98
8.2.30.0000.00719.35
8.2.20.0040.00418.25
8.2.10.0040.00419.64
8.2.00.0040.00419.28
8.1.280.0070.00725.92
8.1.270.0080.00023.92
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0100.00023.96
8.1.230.0070.00319.27
8.1.220.0040.00417.90
8.1.210.0040.00418.77
8.1.200.0030.00717.35
8.1.190.0030.00517.35
8.1.180.0030.00518.10
8.1.170.0030.00618.68
8.1.160.0040.00419.12
8.1.150.0040.00418.93
8.1.140.0040.00420.34
8.1.130.0000.00720.13
8.1.120.0000.00817.60
8.1.110.0000.00717.61
8.1.100.0040.00417.46
8.1.90.0000.00717.61
8.1.80.0040.00417.57
8.1.70.0000.00717.45
8.1.60.0080.00017.67
8.1.50.0050.00317.52
8.1.40.0000.00817.53
8.1.30.0050.00317.69
8.1.20.0040.00417.70
8.1.10.0060.00317.59
8.1.00.0040.00417.66
8.0.300.0080.00019.91
8.0.290.0000.00817.00
8.0.280.0070.00018.55
8.0.270.0000.00717.00
8.0.260.0030.00320.15
8.0.250.0000.00717.18
8.0.240.0080.00017.01
8.0.230.0000.00717.11
8.0.220.0030.00517.01
8.0.210.0000.00817.01
8.0.200.0040.00417.05
8.0.190.0030.00617.12
8.0.180.0000.00817.16
8.0.170.0090.00017.01
8.0.160.0040.00417.04
8.0.150.0000.00816.97
8.0.140.0000.00716.95
8.0.130.0060.00013.50
8.0.120.0000.00716.95
8.0.110.0000.00717.08
8.0.100.0060.00317.07
8.0.90.0000.00917.08
8.0.80.0150.00617.07
8.0.70.0000.00816.87
8.0.60.0040.00417.10
8.0.50.0060.00317.05
8.0.30.0140.00417.06
8.0.20.0090.00917.33
8.0.10.0070.00017.21
8.0.00.0190.00616.91
7.4.330.0000.00515.55
7.4.320.0030.00316.79
7.4.300.0000.00716.62
7.4.290.0070.00016.62
7.4.280.0000.00816.58
7.4.270.0040.00416.68
7.4.260.0000.00613.51
7.4.250.0000.00716.70
7.4.240.0020.00516.64
7.4.230.0020.00516.52
7.4.220.0020.00516.63
7.4.210.0080.00916.74
7.4.200.0020.00516.72
7.4.130.0110.00716.70
7.4.120.0060.01216.68
7.4.110.0070.01116.46
7.4.100.0130.00516.71
7.4.90.0070.01316.81
7.4.80.0100.00719.39
7.4.70.0040.01216.61
7.4.60.0070.01016.63
7.4.50.0090.00516.50
7.4.40.0080.00816.66
7.4.00.0070.01214.97
7.3.330.0000.00716.58
7.3.320.0030.00313.55
7.3.310.0040.00416.48
7.3.300.0070.00016.57
7.3.290.0000.00716.41
7.3.280.0040.01116.57
7.3.260.0110.00816.67
7.3.240.0090.00916.61
7.3.230.0030.01616.43
7.3.210.0080.01516.68
7.3.200.0090.00916.46
7.3.190.0080.00816.77
7.3.180.0030.01416.60
7.3.170.0130.00316.58
7.3.160.0080.00816.49
7.3.120.0070.01115.07
7.3.110.0030.01014.79
7.3.100.0020.01314.81
7.3.90.0100.00615.06
7.3.80.0040.00914.99
7.3.70.0070.01014.91
7.3.60.0100.00714.76
7.3.50.0100.00614.82
7.3.40.0080.00814.97
7.3.30.0030.01315.01
7.3.20.0090.00616.59
7.3.10.0070.00916.58
7.3.00.0090.00716.70
7.2.330.0090.00916.85
7.2.320.0070.01016.64
7.2.310.0030.01416.85
7.2.300.0100.00717.04
7.2.290.0130.00316.96
7.2.250.0070.01115.13
7.2.240.0100.01015.11
7.2.230.0060.01014.95
7.2.220.0100.00914.99
7.2.210.0080.00715.08
7.2.200.0060.01015.13
7.2.190.0080.01014.96
7.2.180.0090.00815.06
7.2.170.0070.00915.20
7.2.160.0050.01114.86
7.2.150.0070.01216.83
7.2.140.0070.01216.41
7.2.130.0070.01016.55
7.2.120.0070.00916.63
7.2.110.0100.00816.77
7.2.100.0090.01316.73
7.2.90.0100.00816.96
7.2.80.0040.01116.69
7.2.70.0060.00916.82
7.2.60.0100.00516.84
7.2.50.0150.00616.77
7.2.40.0060.00916.94
7.2.30.0080.01016.94
7.2.20.0020.01516.88
7.2.10.0050.01016.77
7.2.00.0130.00516.84
7.1.330.0060.00616.04
7.1.320.0060.00915.68
7.1.310.0110.00415.84
7.1.300.0060.00715.66
7.1.290.0050.01115.55
7.1.280.0070.00815.71
7.1.270.0100.00515.61
7.1.260.0080.00815.95
7.1.250.0080.00715.53
7.1.240.0150.00915.76
7.1.230.0200.00315.72
7.1.220.0150.01215.82
7.1.210.0090.01315.81
7.1.200.0050.01615.95
7.1.190.0120.00815.85
7.1.180.0150.00415.63
7.1.170.0170.00415.97
7.1.160.0100.01015.69
7.1.150.0120.00815.98
7.1.140.0130.00615.67
7.1.130.0140.00615.68
7.1.120.0200.00415.89
7.1.110.0120.01015.80
7.1.100.0100.01015.60
7.1.90.0130.01315.57
7.1.80.0200.00815.68
7.1.70.0160.01015.66
7.1.60.0140.01115.92
7.1.50.0150.00515.74
7.1.40.0160.00315.79
7.1.30.0050.01515.77
7.1.20.0160.00315.74
7.1.10.0170.00715.68
7.1.00.0140.00515.88
7.0.330.0170.00415.56
7.0.320.0120.00815.43
7.0.310.0110.00815.27
7.0.300.0150.00315.50
7.0.290.0180.00015.33
7.0.280.0150.00815.32
7.0.270.0050.01415.34
7.0.260.0150.00815.43
7.0.250.0170.01115.35
7.0.240.0110.00815.43
7.0.230.0220.00615.44
7.0.220.0200.00615.37
7.0.210.0160.00915.35
7.0.200.0170.00815.43
7.0.190.0090.00915.43
7.0.180.0110.00815.43
7.0.170.0150.00615.36
7.0.160.0150.00515.32
7.0.150.0200.00815.25
7.0.140.0110.00915.63
7.0.130.0140.00915.42
7.0.120.0270.00315.58
7.0.110.0170.00915.55
7.0.100.0140.00515.13
7.0.90.0100.01015.55
7.0.80.0170.00615.50
7.0.70.0100.01015.38
7.0.60.0110.01115.54
7.0.50.0160.00415.25
7.0.40.0150.00515.38
7.0.30.0160.00715.58
7.0.20.0140.00715.45
7.0.10.0210.00315.44
7.0.00.0110.01115.55
5.6.400.0060.01314.17
5.6.390.0160.01114.45
5.6.380.0220.00214.41
5.6.370.0200.00014.56
5.6.360.0170.00314.34
5.6.350.0070.01114.73
5.6.340.0110.01014.47
5.6.330.0080.01114.71
5.6.320.0080.01314.68
5.6.310.0140.01414.22
5.6.300.0130.01614.44
5.6.290.0060.01814.69
5.6.280.0200.00014.54
5.6.270.0130.01214.69
5.6.260.0120.01014.47
5.6.250.0120.00814.46
5.6.240.0080.01214.40
5.6.230.0040.01614.69
5.6.220.0130.00914.40
5.6.210.0070.01414.50
5.6.200.0070.01414.47
5.6.190.0210.00014.54
5.6.180.0080.01314.47
5.6.170.0110.01514.20
5.6.160.0230.00514.59
5.6.150.0210.00714.55
5.6.140.0190.00814.46
5.6.130.0130.01314.80
5.6.120.0200.00314.28
5.6.110.0140.01014.66
5.6.100.0140.01514.37
5.6.90.0220.00414.46
5.6.80.0190.01214.46
5.6.70.0180.01014.59
5.6.60.0130.01314.43
5.6.50.0130.01314.35
5.6.40.0140.01114.46
5.6.30.0250.00014.29
5.6.20.0110.01514.13
5.6.10.0170.00314.45
5.6.00.0150.00514.27
5.5.380.0100.01014.43
5.5.370.0130.00914.78
5.5.360.0100.01314.38
5.5.350.0190.00514.38
5.5.340.0170.00514.62
5.5.330.0210.00314.48
5.5.320.0150.00914.27
5.5.310.0040.02114.25
5.5.300.0130.01014.77
5.5.290.0150.00814.59
5.5.280.0170.01114.38
5.5.270.0070.01714.45
5.5.260.0090.01814.11
5.5.250.0210.00614.57
5.5.240.0220.00514.21
5.5.230.0230.00314.54
5.5.220.0200.00914.37
5.5.210.0100.01014.18
5.5.200.0090.01614.50
5.5.190.0150.00614.33
5.5.180.0170.00614.02
5.5.170.0100.01314.25
5.5.160.0160.00814.36
5.5.150.0050.01614.21
5.5.140.0080.01313.98
5.5.130.0150.00813.89
5.5.120.0190.00314.50
5.5.110.0160.00514.37
5.5.100.0180.00314.46
5.5.90.0100.01014.48
5.5.80.0100.01314.26
5.5.70.0160.00814.11
5.5.60.0110.00814.46
5.5.50.0160.00514.37
5.5.40.0150.00814.20
5.5.30.0030.01914.36
5.5.20.0130.00814.46
5.5.10.0190.00414.20
5.5.00.0120.00714.46
5.4.450.0090.01211.18
5.4.440.0100.00911.03
5.4.430.0160.00511.38
5.4.420.0080.00911.35
5.4.410.0130.00811.15
5.4.400.0090.00911.09
5.4.390.0130.00711.09
5.4.380.0100.01110.98
5.4.370.0040.01310.76
5.4.360.0170.00011.14
5.4.350.0100.00711.15
5.4.340.0170.00011.02
5.4.330.0110.00410.83
5.4.320.0090.01210.88
5.4.310.0070.01110.90
5.4.300.0100.00711.19
5.4.290.0080.00811.11
5.4.280.0060.00911.04
5.4.270.0150.00011.33
5.4.260.0100.00510.98
5.4.250.0140.00611.17
5.4.240.0100.00711.27
5.4.230.0140.00311.08
5.4.220.0120.00311.30
5.4.210.0160.00410.88
5.4.200.0080.00811.07
5.4.190.0080.00611.41
5.4.180.0080.00811.25
5.4.170.0120.00311.11
5.4.160.0070.00711.05
5.4.150.0110.00411.34
5.4.140.0110.00311.09
5.4.130.0090.00611.13
5.4.120.0070.00711.41
5.4.110.0120.00311.25
5.4.100.0120.00311.22
5.4.90.0100.00511.45
5.4.80.0090.00611.43
5.4.70.0050.01011.22
5.4.60.0000.01611.32
5.4.50.0070.00911.19
5.4.40.0110.00311.24
5.4.30.0060.01011.51
5.4.20.0050.00911.20
5.4.10.0100.00711.30
5.4.00.0120.01011.23
5.3.290.0160.00010.86
5.3.280.0000.01610.73
5.3.270.0080.00810.57
5.3.260.0070.00810.85
5.3.250.0090.00510.74
5.3.240.0120.00210.45
5.3.230.0090.00410.70
5.3.220.0060.00810.62
5.3.210.0130.00010.62
5.3.200.0070.00710.64
5.3.190.0110.00310.45
5.3.180.0140.00010.88
5.3.170.0070.00710.91
5.3.160.0080.00810.91
5.3.150.0040.01110.80
5.3.140.0100.00710.74
5.3.130.0120.00410.78
5.3.120.0070.00710.67
5.3.110.0070.00710.79
5.3.100.0070.00710.51
5.3.90.0130.00310.77
5.3.80.0090.00610.77
5.3.70.0100.00310.68
5.3.60.0050.01110.81
5.3.50.0120.00310.55
5.3.40.0140.00310.75
5.3.30.0050.00910.60
5.3.20.0080.00410.40
5.3.10.0110.00810.55
5.3.00.0070.00810.29
5.2.170.0100.0029.73
5.2.160.0060.0069.66
5.2.150.0090.0029.70
5.2.140.0050.0059.67
5.2.130.0080.0059.66
5.2.120.0060.0069.66
5.2.110.0060.0069.66
5.2.100.0140.0039.66
5.2.90.0140.0009.66
5.2.80.0060.0069.66
5.2.70.0030.0099.66
5.2.60.0110.0039.66
5.2.50.0110.0009.66
5.2.40.0100.0039.66
5.2.30.0050.0079.66
5.2.20.0060.0069.66
5.2.10.0050.0059.66
5.2.00.0060.0069.66
5.1.60.0040.0079.66
5.1.50.0070.0039.66
5.1.40.0080.0049.66
5.1.30.0080.0039.66
5.1.20.0110.0039.66
5.1.10.0080.0049.66
5.1.00.0030.0129.66
5.0.50.0070.0049.66
5.0.40.0050.0059.66
5.0.30.0050.0059.66
5.0.20.0040.0049.66
5.0.10.0100.0009.66
5.0.00.0000.0109.66
4.4.90.0000.0099.66
4.4.80.0000.0079.66
4.4.70.0060.0029.66
4.4.60.0040.0049.66
4.4.50.0020.0059.66
4.4.40.0000.0089.66
4.4.30.0000.0079.66
4.4.20.0000.0089.66
4.4.10.0110.0009.66
4.4.00.0030.0089.66
4.3.110.0040.0049.66
4.3.100.0050.0039.66
4.3.90.0000.0089.66
4.3.80.0080.0009.66
4.3.70.0080.0009.66
4.3.60.0060.0069.66
4.3.50.0050.0029.66
4.3.40.0050.0029.66
4.3.30.0050.0029.66
4.3.20.0000.0079.66
4.3.10.0060.0009.66
4.3.00.0040.0049.66

preferences:
70.55 ms | 400 KiB | 5 Q