3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = [ 'US' => 'United States', 'GB' => 'United Kingdom', 'AF' => 'Afghanistan', 'AX' => 'Åland Islands', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'American Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AI' => 'Anguilla', 'AQ' => 'Antarctica', 'AG' => 'Antigua and Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaijan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BJ' => 'Benin', 'BM' => 'Bermuda', 'BT' => 'Bhutan', 'BO' => 'Bolivia, Plurinational State of', 'BA' => 'Bosnia and Herzegovina', 'BW' => 'Botswana', 'BV' => 'Bouvet Island', 'BR' => 'Brazil', 'IO' => 'British Indian Ocean Territory', 'BN' => 'Brunei Darussalam', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'KH' => 'Cambodia', 'CM' => 'Cameroon', 'CA' => 'Canada', 'CV' => 'Cape Verde', 'KY' => 'Cayman Islands', 'CF' => 'Central African Republic', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CX' => 'Christmas Island', 'CC' => 'Cocos (Keeling) Islands', 'CO' => 'Colombia', 'KM' => 'Comoros', 'CG' => 'Congo', 'CD' => 'Congo, the Democratic Republic of the', 'CK' => 'Cook Islands', 'CR' => 'Costa Rica', 'CI' => "Côte d'Ivoire", 'HR' => 'Croatia', 'CU' => 'Cuba', 'CY' => 'Cyprus', 'CZ' => 'Czech Republic', 'DK' => 'Denmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'EC' => 'Ecuador', 'EG' => 'Egypt', 'SV' => 'El Salvador', 'GQ' => 'Equatorial Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Ethiopia', 'FK' => 'Falkland Islands (Malvinas)', 'FO' => 'Faroe Islands', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'France', 'GF' => 'French Guiana', 'PF' => 'French Polynesia', 'TF' => 'French Southern Territories', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Germany', 'GH' => 'Ghana', 'GI' => 'Gibraltar', 'GR' => 'Greece', 'GL' => 'Greenland', 'GD' => 'Grenada', 'GP' => 'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GG' => 'Guernsey', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HM' => 'Heard Island and McDonald Islands', 'VA' => 'Holy See (Vatican City State)', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungary', 'IS' => 'Iceland', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Iran, Islamic Republic of', 'IQ' => 'Iraq', 'IE' => 'Ireland', 'IM' => 'Isle of Man', 'IL' => 'Israel', 'IT' => 'Italy', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JE' => 'Jersey', 'JO' => 'Jordan', 'KZ' => 'Kazakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KP' => "Korea, Democratic People's Republic of", 'KR' => 'Korea, Republic of', 'KW' => 'Kuwait', 'KG' => 'Kyrgyzstan', 'LA' => "Lao People's Democratic Republic", 'LV' => 'Latvia', 'LB' => 'Lebanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libyan Arab Jamahiriya', 'LI' => 'Liechtenstein', 'LT' => 'Lithuania', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Macedonia, the former Yugoslav Republic of', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldives', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshall Islands', 'MQ' => 'Martinique', 'MR' => 'Mauritania', 'MU' => 'Mauritius', 'YT' => 'Mayotte', 'MX' => 'Mexico', 'FM' => 'Micronesia, Federated States of', 'MD' => 'Moldova, Republic of', 'MC' => 'Monaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MS' => 'Montserrat', 'MA' => 'Morocco', 'MZ' => 'Mozambique', 'MM' => 'Myanmar', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Netherlands', 'AN' => 'Netherlands Antilles', 'NC' => 'New Caledonia', 'NZ' => 'New Zealand', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'NU' => 'Niue', 'NF' => 'Norfolk Island', 'MP' => 'Northern Mariana Islands', 'NO' => 'Norway', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestinian Territory, Occupied', 'PA' => 'Panama', 'PG' => 'Papua New Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Philippines', 'PN' => 'Pitcairn', 'PL' => 'Poland', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'RE' => 'Réunion', 'RO' => 'Romania', 'RU' => 'Russian Federation', 'RW' => 'Rwanda', 'BL' => 'Saint Barthélemy', 'SH' => 'Saint Helena', 'KN' => 'Saint Kitts and Nevis', 'LC' => 'Saint Lucia', 'MF' => 'Saint Martin (French part)', 'PM' => 'Saint Pierre and Miquelon', 'VC' => 'Saint Vincent and the Grenadines', 'WS' => 'Samoa', 'SM' => 'San Marino', 'ST' => 'Sao Tome and Principe', 'SA' => 'Saudi Arabia', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakia', 'SI' => 'Slovenia', 'SB' => 'Solomon Islands', 'SO' => 'Somalia', 'ZA' => 'South Africa', 'GS' => 'South Georgia and the South Sandwich Islands', 'ES' => 'Spain', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SJ' => 'Svalbard and Jan Mayen', 'SZ' => 'Swaziland', 'SE' => 'Sweden', 'CH' => 'Switzerland', 'SY' => 'Syrian Arab Republic', 'TW' => 'Taiwan, Province of China', 'TJ' => 'Tajikistan', 'TZ' => 'Tanzania, United Republic of', 'TH' => 'Thailand', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TK' => 'Tokelau', 'TO' => 'Tonga', 'TT' => 'Trinidad and Tobago', 'TN' => 'Tunisia', 'TR' => 'Turkey', 'TM' => 'Turkmenistan', 'TC' => 'Turks and Caicos Islands', 'TV' => 'Tuvalu', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'United Arab Emirates', 'UM' => 'United States Minor Outlying Islands', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VE' => 'Venezuela, Bolivarian Republic of', 'VN' => 'Viet Nam', 'VG' => 'Virgin Islands, British', 'VI' => 'Virgin Islands, U.S.', 'WF' => 'Wallis and Futuna', 'EH' => 'Western Sahara', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' ]; echo json_encode($x);

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.0070.01418.11
8.3.50.0150.00721.92
8.3.40.0140.00318.67
8.3.30.0130.00019.09
8.3.20.0050.00220.39
8.3.10.0040.00421.89
8.3.00.0040.00419.12
8.2.180.0150.00618.04
8.2.170.0210.00022.96
8.2.160.0040.01122.11
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0140.00026.16
8.2.120.0080.00019.77
8.2.110.0060.00320.34
8.2.100.0040.00818.22
8.2.90.0060.00619.06
8.2.80.0030.00617.97
8.2.70.0080.00017.49
8.2.60.0050.00317.91
8.2.50.0000.00818.07
8.2.40.0040.00419.86
8.2.30.0110.00018.15
8.2.20.0000.00717.72
8.2.10.0000.00818.15
8.2.00.0000.00717.54
8.1.280.0150.00625.92
8.1.270.0110.00424.66
8.1.260.0000.00826.35
8.1.250.0070.00028.09
8.1.240.0030.00623.97
8.1.230.0110.00018.97
8.1.220.0000.00817.74
8.1.210.0090.00018.77
8.1.200.0000.00917.00
8.1.190.0000.00817.10
8.1.180.0050.00318.10
8.1.170.0100.00318.53
8.1.160.0050.00222.05
8.1.150.0050.00318.78
8.1.140.0050.00317.43
8.1.130.0040.00417.74
8.1.120.0000.00717.48
8.1.110.0040.00417.38
8.1.100.0070.00017.48
8.1.90.0000.00717.47
8.1.80.0030.00417.31
8.1.70.0070.00017.45
8.1.60.0000.00917.45
8.1.50.0040.00417.53
8.1.40.0040.00417.54
8.1.30.0080.00017.65
8.1.20.0050.00317.54
8.1.10.0040.00417.54
8.1.00.0000.00717.33
8.0.300.0070.00018.77
8.0.290.0060.00316.88
8.0.280.0000.00718.33
8.0.270.0030.00317.30
8.0.260.0090.00017.31
8.0.250.0030.00516.99
8.0.240.0030.00317.03
8.0.230.0000.00816.97
8.0.220.0030.00316.86
8.0.210.0000.00716.84
8.0.200.0030.00316.97
8.0.190.0060.00316.93
8.0.180.0050.00216.91
8.0.170.0000.00716.88
8.0.160.0000.00716.80
8.0.150.0080.00016.79
8.0.140.0030.00616.88
8.0.130.0030.00313.26
8.0.120.0080.00016.74
8.0.110.0040.00416.92
8.0.100.0000.00716.75
8.0.90.0000.00716.90
8.0.80.0070.01416.80
8.0.70.0030.00516.91
8.0.60.0040.00416.91
8.0.50.0000.00716.69
8.0.30.0150.00717.03
8.0.20.0130.00717.40
8.0.10.0030.00316.88
8.0.00.0080.00916.78
7.4.330.0060.00015.08
7.4.320.0000.00716.39
7.4.300.0000.00616.58
7.4.290.0030.00316.50
7.4.280.0060.00316.41
7.4.270.0030.00316.41
7.4.260.0070.00316.49
7.4.250.0040.00416.45
7.4.240.0030.00316.50
7.4.230.0030.00316.58
7.4.220.0060.01216.58
7.4.210.0070.01016.65
7.4.200.0080.00016.60
7.4.160.0170.00316.35
7.4.150.0070.01117.40
7.4.140.0080.01117.86
7.4.130.0080.01116.63
7.4.120.0070.01016.61
7.4.110.0080.00816.59
7.4.100.0090.00916.24
7.4.90.0220.00016.48
7.4.80.0090.01219.39
7.4.70.0070.01716.36
7.4.60.0040.01216.66
7.4.50.0060.00016.55
7.4.40.0070.01016.40
7.4.30.0180.00316.45
7.4.00.0060.00915.20
7.3.330.0050.00013.16
7.3.320.0000.00513.11
7.3.310.0000.00716.28
7.3.300.0070.00016.19
7.3.290.0050.01116.22
7.3.280.0070.00916.21
7.3.270.0090.01217.40
7.3.260.0140.00416.34
7.3.250.0080.00916.40
7.3.240.0100.00716.52
7.3.230.0130.00316.40
7.3.210.0100.00716.29
7.3.200.0070.01019.39
7.3.190.0100.00916.22
7.3.180.0120.00816.56
7.3.170.0150.00416.37
7.3.160.0160.00616.15
7.2.330.0130.00316.66
7.2.320.0130.00316.35
7.2.310.0120.00616.66
7.2.300.0170.00416.39
7.2.290.0100.00716.56
7.2.00.0120.00319.38
7.1.100.0190.00317.97
7.1.70.0060.00917.08
7.1.60.0070.02119.46
7.1.50.0060.01616.66
7.1.00.0000.08022.35
7.0.200.0090.00616.46
7.0.140.0030.06022.08
7.0.110.0100.08020.05
7.0.100.0130.07720.02
7.0.90.0130.07719.94
7.0.80.0100.08319.88
7.0.70.0030.08319.95
7.0.60.0130.07719.91
7.0.50.0030.06720.09
7.0.40.0130.07719.88
7.0.30.0130.07019.73
7.0.20.0100.07019.66
7.0.10.0070.05019.73
7.0.00.0000.05319.74
5.6.280.0030.07321.18
5.6.260.0030.08020.96
5.6.250.0100.08020.79
5.6.240.0100.08020.62
5.6.230.0130.08020.70
5.6.220.0000.08320.53
5.6.210.0070.08020.71
5.6.200.0100.08320.66
5.6.190.0100.08320.66
5.6.180.0100.08020.54
5.6.170.0070.08020.70
5.6.160.0030.08020.68
5.6.150.0070.05020.68
5.6.140.0030.04720.75
5.6.130.0070.04020.72
5.6.120.0070.07020.72
5.6.110.0070.08320.77
5.6.100.0030.08020.52
5.6.90.0070.05320.71
5.6.80.0130.06020.01
5.6.70.0100.07320.02
5.6.60.0030.08020.09
5.6.50.0100.07320.06
5.6.40.0100.06320.04
5.6.30.0030.08020.02
5.6.20.0000.06020.02
5.6.10.0070.07719.98
5.6.00.0000.08320.03
5.5.380.0100.07017.53
5.5.370.0130.07317.51
5.5.360.0070.07317.64
5.5.350.0000.06317.51
5.5.340.0000.04718.16
5.5.330.0100.07317.94
5.5.320.0030.04318.20
5.5.310.0100.07717.98
5.5.300.0070.07718.14
5.5.290.0070.08018.20
5.5.280.0100.07717.93
5.5.270.0200.05718.15
5.5.260.0070.05017.91
5.5.250.0070.08017.77
5.5.240.0070.07317.59
5.5.230.0100.07317.50
5.5.220.0030.07317.49
5.5.210.0070.07317.51
5.5.200.0030.07717.34
5.5.190.0030.06017.56
5.5.180.0130.07017.30
5.5.160.0030.07717.55
5.5.150.0000.06017.43
5.5.140.0170.06717.37
5.5.130.0000.05317.27
5.5.120.0070.07317.30
5.5.110.0100.07717.40
5.5.100.0070.07717.18
5.5.90.0070.07317.11
5.5.80.0070.07317.38
5.5.70.0030.08017.44
5.5.60.0030.07317.32
5.5.50.0170.06717.45
5.5.40.0130.06317.52
5.5.30.0130.06017.46
5.5.20.0130.07017.21
5.5.10.0070.07717.17
5.5.00.0000.08317.39
5.4.450.0170.07019.35
5.4.440.0170.07019.44
5.4.430.0100.07719.35
5.4.420.0100.05019.36
5.4.410.0070.07719.15
5.4.400.0070.07719.01
5.4.390.0030.07318.95
5.4.380.0030.07318.95
5.4.370.0070.05018.95
5.4.360.0100.07019.02
5.4.350.0030.07718.93
5.4.340.0030.07319.29
5.4.320.0070.07319.13
5.4.310.0100.07318.95
5.4.300.0070.07019.07
5.4.290.0070.06319.07
5.4.280.0100.07719.02
5.4.270.0030.07019.11
5.4.260.0070.07719.29
5.4.250.0200.07019.00
5.4.240.0030.07319.09
5.4.230.0070.07319.05
5.4.220.0070.07718.99
5.4.210.0100.07719.02
5.4.200.0000.06319.07
5.4.190.0170.05719.16
5.4.180.0100.04019.09
5.4.170.0170.07319.00
5.4.160.0100.07719.14
5.4.150.0100.07319.24
5.4.140.0100.07316.50
5.4.130.0100.07016.31
5.4.120.0000.08016.58
5.4.110.0100.07016.60
5.4.100.0070.07316.37
5.4.90.0170.06316.43
5.4.80.0070.04716.43
5.4.70.0070.07016.44
5.4.60.0000.08016.44
5.4.50.0000.07716.43
5.4.40.0070.07016.40
5.4.30.0100.07316.54
5.4.20.0000.04716.52
5.4.10.0100.07316.39
5.4.00.0100.07315.93
5.3.290.0030.07714.77
5.3.280.0070.08014.43
5.3.270.0070.06314.61
5.3.260.0070.07014.47
5.3.250.0100.05714.48
5.3.240.0070.07314.61
5.3.230.0030.07314.66
5.3.220.0100.04714.64
5.3.210.0070.07314.64
5.3.200.0100.07314.41
5.3.190.0030.08014.49
5.3.180.0100.06714.39
5.3.170.0030.08014.41
5.3.160.0070.06014.47
5.3.150.0170.06314.49
5.3.140.0100.06314.63
5.3.130.0130.06314.38
5.3.120.0070.07014.36
5.3.110.0000.07714.39
5.3.100.0070.06713.87
5.3.90.0070.07314.09
5.3.80.0070.06013.89
5.3.70.0070.07313.95
5.3.60.0100.07014.02
5.3.50.0070.07313.84
5.3.40.0030.07314.02
5.3.30.0030.07013.79
5.3.20.0000.05713.62
5.3.10.0130.06313.55
5.3.00.0030.07313.45
5.2.170.0070.05711.07
5.2.160.0000.06311.16
5.2.150.0030.06311.09
5.2.140.0030.06011.20
5.2.130.0030.04010.89
5.2.120.0100.05311.18
5.2.110.0070.05310.89
5.2.100.0070.06011.13
5.2.90.0030.06011.27
5.2.80.0030.06311.04
5.2.70.0000.06011.26
5.2.60.0070.04310.97
5.2.50.0030.05011.09
5.2.40.0100.05311.07
5.2.30.0000.05710.92
5.2.20.0070.05010.91
5.2.10.0000.06710.95
5.2.00.0070.05310.63
5.1.60.0030.04710.19
5.1.50.0000.03310.19
5.1.40.0000.03010.19
5.1.30.0030.03310.48
5.1.20.0070.05310.27
5.1.10.0070.03710.19
5.1.00.0030.05710.24
5.0.50.0070.04310.19
5.0.40.0000.04710.19
5.0.30.0070.05010.19
5.0.20.0000.03310.19
5.0.10.0030.02710.19
5.0.00.0070.05710.19
4.4.90.0070.03010.19
4.4.80.0030.03010.19
4.4.70.0000.03310.19
4.4.60.0130.02310.19
4.4.50.0000.03310.19
4.4.40.0030.04710.19
4.4.30.0030.01310.19
4.4.20.0000.03710.19
4.4.10.0030.03710.19
4.4.00.0070.04710.19
4.3.110.0030.01710.19
4.3.100.0030.03010.19
4.3.90.0000.02310.19
4.3.80.0000.05310.19
4.3.70.0030.01710.19
4.3.60.0000.02710.19
4.3.50.0030.03310.19
4.3.40.0070.05010.19
4.3.30.0000.03710.19
4.3.20.0000.03010.19
4.3.10.0000.03010.19
4.3.00.0000.03310.19

preferences:
45.96 ms | 401 KiB | 5 Q