3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Core\Bundle\Service\Property\Room\Rooms; class CountryMapping { const CZ = 'CZ'; const EN = 'EN'; public function get(string $countryIsoCode = null) : string // Works correctly if return type is removed { switch (strtoupper($countryIsoCode)) { case 'CZ': case 'SK': return self::CZ; // Works correctly if changed to CountryMapping::CZ default: return self::EN; // Works correctly if changed to CountryMapping::EN } } } $mapping = new CountryMapping(); var_dump($mapping->get('CZ'));

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.0060.00918.31
8.3.50.0140.00416.36
8.3.40.0090.00918.70
8.3.30.0070.00718.54
8.3.20.0040.00420.73
8.3.10.0030.00521.91
8.3.00.0000.00819.26
8.2.180.0110.00418.13
8.2.170.0060.00822.96
8.2.160.0070.01020.44
8.2.150.0000.00724.18
8.2.140.0000.00924.66
8.2.130.0030.00619.29
8.2.120.0000.00726.35
8.2.110.0040.00420.43
8.2.100.0110.00017.72
8.2.90.0040.00417.63
8.2.80.0000.00818.64
8.2.70.0090.00017.68
8.2.60.0090.00018.02
8.2.50.0030.00619.25
8.2.40.0050.00321.09
8.2.30.0040.00419.19
8.2.20.0040.00417.94
8.2.10.0000.00717.93
8.2.00.0000.00917.68
8.1.280.0150.00025.92
8.1.270.0040.00422.10
8.1.260.0070.00026.35
8.1.250.0080.00028.09
8.1.240.0100.00722.11
8.1.230.0070.00417.70
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0040.00417.10
8.1.180.0000.00818.84
8.1.170.0060.00318.37
8.1.160.0000.00718.83
8.1.150.0040.00420.30
8.1.140.0040.00419.48
8.1.130.0060.00319.57
8.1.120.0030.00317.30
8.1.110.0020.00517.40
8.1.100.0000.00817.34
8.1.90.0000.00717.45
8.1.80.0050.00217.32
8.1.70.0000.00717.31
8.1.60.0050.00317.62
8.1.50.0040.00417.41
8.1.40.0040.00417.57
8.1.30.0030.00617.67
8.1.20.0030.00617.67
8.1.10.0040.00417.62
8.1.00.0040.00417.48
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0070.00018.36
8.0.270.0030.00317.30
8.0.260.0090.00017.26
8.0.250.0030.00316.93
8.0.240.0070.00016.93
8.0.230.0070.00016.95
8.0.220.0080.00016.90
8.0.210.0030.00316.90
8.0.200.0000.00616.92
8.0.190.0050.00316.84
8.0.180.0040.00416.97
8.0.170.0000.00716.92
8.0.160.0000.00716.96
8.0.150.0070.00016.74
8.0.140.0070.00016.78
8.0.130.0090.00013.38
8.0.120.0070.00016.86
8.0.110.0000.00716.84
8.0.100.0040.00416.94
8.0.90.0000.00716.92
8.0.80.0060.00916.94
8.0.70.0040.00416.88
8.0.60.0040.00416.74
8.0.50.0070.00016.80
8.0.30.0040.01617.08
8.0.20.0120.01217.40
8.0.10.0070.00016.90
8.0.00.0090.00916.52
7.4.330.0000.00515.55
7.4.320.0000.00616.50
7.4.300.0030.00316.56
7.4.290.0040.00416.47
7.4.280.0040.00416.59
7.4.270.0040.00416.50
7.4.260.0000.00716.55
7.4.250.0050.00216.46
7.4.240.0070.00016.54
7.4.230.0000.00716.63
7.4.220.0090.00916.53
7.4.210.0060.00916.67
7.4.200.0070.00016.70
7.4.160.0130.00516.53
7.4.150.0040.01817.40
7.4.140.0100.00817.86
7.4.130.0110.00616.45
7.4.120.0100.00816.46
7.4.110.0160.00616.47
7.4.100.0160.00916.36
7.4.90.0100.00716.53
7.4.80.0110.01019.39
7.4.70.0080.00816.33
7.4.60.0030.01316.42
7.4.50.0060.00916.57
7.4.40.0040.01116.38
7.4.30.0120.00616.58
7.4.00.0030.01215.20
7.3.330.0050.00013.29
7.3.320.0050.00013.31
7.3.310.0070.00016.37
7.3.300.0000.00716.36
7.3.290.0090.00616.32
7.3.280.0110.00916.30
7.3.270.0200.01717.40
7.3.260.0110.00716.29
7.3.250.0080.01016.28
7.3.240.0080.01016.25
7.3.230.0060.01216.39
7.3.210.0060.01016.36
7.3.200.0110.00616.48
7.3.190.0140.00716.50
7.3.180.0150.00016.38
7.3.170.0060.01016.41
7.3.160.0100.00716.51
7.3.120.0080.00814.70
7.3.110.0100.00714.77
7.3.100.0090.00614.53
7.3.90.0110.00814.66
7.3.80.0070.00914.63
7.3.70.0060.01414.80
7.3.60.0130.00614.66
7.3.50.0080.01014.51
7.3.40.0080.01414.84
7.3.30.0120.01214.72
7.3.20.0140.00514.75
7.3.10.0110.01114.82
7.3.00.0110.00614.71
7.2.330.0090.00916.52
7.2.320.0100.01316.61
7.2.310.0100.00616.66
7.2.300.0060.01016.77
7.2.290.0060.01616.52
7.2.240.0110.00714.90
7.2.230.0160.00314.64
7.2.220.0140.01115.19
7.2.210.0140.00314.78
7.2.200.0140.01114.77
7.2.190.0100.00915.11
7.2.180.0170.00615.08
7.2.170.0070.01514.75
7.2.160.0090.01515.04
7.2.150.0110.01115.14
7.2.140.0030.01914.61
7.2.130.0100.00715.09
7.2.120.0060.01914.83
7.2.110.0150.00514.97
7.2.100.0120.01215.17
7.2.90.0090.01515.22
7.2.80.0140.01115.11
7.2.70.0040.01815.21
7.2.60.0080.00815.89
7.2.50.0140.00815.13
7.2.40.0150.00715.20
7.2.30.0120.01215.18
7.2.20.0230.01415.23
7.2.10.0100.01115.20
7.2.00.0200.02314.99
7.1.330.0070.01413.78
7.1.320.0150.00513.96
7.1.310.0000.01413.75
7.1.300.0180.00714.01
7.1.290.0100.01313.94
7.1.280.0160.00514.06
7.1.270.0090.01313.81
7.1.260.0140.00714.09
7.1.250.0110.00813.93
7.1.240.0260.00313.92
7.1.230.0240.00613.63
7.1.220.0200.00613.91
7.1.210.0250.00513.76
7.1.200.0110.00714.83
7.1.190.0200.00313.98
7.1.180.0110.01413.99
7.1.170.0210.00714.00
7.1.160.0140.01514.02
7.1.150.0150.00814.05
7.1.140.0200.00314.06
7.1.130.0180.00813.83
7.1.120.0200.00913.93
7.1.110.0050.01513.86
7.1.100.0130.01013.84
7.1.90.0290.00013.96
7.1.80.0170.00713.56
7.1.70.0070.00915.58
7.1.60.0060.01215.42
7.1.50.0070.01115.56
7.1.40.0160.01013.65
7.1.30.0120.01014.00
7.1.20.0160.00913.84
7.1.10.0170.00714.05
7.1.00.0700.05018.52
7.0.330.0090.01413.40
7.0.320.0190.00713.66
7.0.310.0240.00013.57
7.0.300.0240.00313.52
7.0.290.0050.02013.51
7.0.280.0130.01313.54
7.0.270.0190.00613.41
7.0.260.0170.01013.52
7.0.250.0140.00713.74
7.0.240.0110.00813.75
7.0.230.0100.01413.51
7.0.220.0160.00713.53
7.0.210.0230.00413.72
7.0.200.0120.00314.19
7.0.190.0110.01113.61
7.0.180.0140.00713.52
7.0.170.0140.00813.35
7.0.160.0100.01513.55
7.0.150.0160.00413.35
7.0.140.0230.03917.02
7.0.130.0400.03516.90
7.0.120.0360.02916.91
7.0.110.0300.03716.88
7.0.100.0250.04517.01
7.0.90.0350.03516.94
7.0.80.0500.03716.98
7.0.70.0260.03416.72
7.0.60.0320.03116.89
7.0.50.0270.03516.93
7.0.40.0310.03116.97
7.0.30.0290.03616.96
7.0.20.0300.03516.96
7.0.10.0320.03016.82
7.0.00.0330.03116.92
5.6.400.0140.01114.06
5.6.390.0160.00813.83
5.6.380.0220.00714.27
5.6.370.0130.01013.92
5.6.360.0160.00914.04
5.6.350.0130.01314.05
5.6.340.0150.01213.87
5.6.330.0080.02014.14
5.6.320.0250.00413.93
5.6.310.0100.01414.32
5.6.300.0100.00713.95
5.6.290.0060.03817.45
5.6.280.0030.04817.57
5.6.270.0130.03017.35
5.6.260.0100.03317.57
5.6.250.0230.03417.72
5.6.240.0210.03417.46
5.6.230.0080.03517.58
5.6.220.0120.03717.51
5.6.210.0090.03417.47
5.6.200.0090.03917.62
5.6.190.0150.03317.45
5.6.180.0150.03317.59
5.6.170.0110.03217.60
5.6.160.0090.03917.34
5.6.150.0080.03917.45
5.6.140.0150.04417.48
5.6.130.0120.03417.55
5.6.120.0110.03717.52
5.6.110.0130.03717.63
5.6.100.0130.03417.62
5.6.90.0160.02717.46
5.6.80.0100.03617.16
5.6.70.0100.03417.15
5.6.60.0130.03017.16
5.6.50.0140.02917.19
5.6.40.0130.03217.20
5.6.30.0120.03317.10
5.6.20.0140.02917.14
5.6.10.0100.03017.13
5.6.00.0130.03717.10

preferences:
59.13 ms | 401 KiB | 5 Q