3v4l.org

run code in 300+ PHP versions simultaneously
<?php $hash =[ 'code' => 'valeur', 'foo_fury' => 'bar', 'foo_bar_baz' => 'FOOOOO' ]; $shipping_method = 'foo_bar_baz_pong'; foreach ($hash as $code => $label){ if(substr($shipping_method,0, strlen($code)) == $code){ $carrier_code = $code; break; } var_dump($code); } var_dump($carrier_code);

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.0120.00616.50
8.3.50.0070.01416.48
8.3.40.0080.00818.32
8.3.30.0150.00318.45
8.3.20.0080.00018.98
8.3.10.0070.00023.67
8.3.00.0060.00319.29
8.2.180.0150.00618.17
8.2.170.0070.00722.96
8.2.160.0080.00820.20
8.2.150.0110.00725.66
8.2.140.0080.00024.66
8.2.130.0000.00822.11
8.2.120.0030.00526.35
8.2.110.0050.00520.89
8.2.100.0100.00717.78
8.2.90.0030.00519.09
8.2.80.0000.00917.97
8.2.70.0040.00417.38
8.2.60.0030.00617.93
8.2.50.0060.00318.10
8.2.40.0040.00422.30
8.2.30.0040.00420.96
8.2.20.0040.00418.00
8.2.10.0030.00518.12
8.2.00.0000.00718.12
8.1.280.0070.01525.92
8.1.270.0050.00322.19
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0040.00423.77
8.1.230.0070.00717.76
8.1.220.0050.00317.79
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0050.00317.23
8.1.180.0080.00018.10
8.1.170.0030.00518.50
8.1.160.0050.00319.00
8.1.150.0030.00618.89
8.1.140.0030.00619.51
8.1.130.0050.00318.93
8.1.120.0030.00317.50
8.1.110.0070.00017.42
8.1.100.0020.00517.51
8.1.90.0040.00417.42
8.1.80.0060.00317.32
8.1.70.0030.00517.50
8.1.60.0000.00917.64
8.1.50.0040.00517.54
8.1.40.0100.00017.51
8.1.30.0000.00717.65
8.1.20.0060.00317.70
8.1.10.0040.00417.56
8.1.00.0000.00717.46
8.0.300.0040.00418.77
8.0.290.0040.00416.63
8.0.280.0000.00818.44
8.0.270.0030.00517.25
8.0.260.0030.00316.73
8.0.250.0000.00616.98
8.0.240.0050.00216.97
8.0.230.0070.00016.93
8.0.220.0000.00616.79
8.0.210.0000.01016.80
8.0.200.0070.00016.88
8.0.190.0050.00316.97
8.0.180.0040.00416.87
8.0.170.0040.00416.81
8.0.160.0050.00316.87
8.0.150.0000.00816.88
8.0.140.0000.00716.73
8.0.130.0050.00013.35
8.0.120.0030.00516.75
8.0.110.0000.00716.68
8.0.100.0070.00016.78
8.0.90.0000.00716.76
8.0.80.0150.00916.85
8.0.70.0040.00416.77
8.0.60.0000.00816.84
8.0.50.0000.00816.71
8.0.30.0120.00717.15
8.0.20.0110.00817.40
8.0.10.0000.00716.90
8.0.00.0120.00616.96
7.4.330.0000.00515.55
7.4.320.0000.00616.66
7.4.300.0030.00316.45
7.4.290.0030.00716.52
7.4.280.0050.00316.59
7.4.270.0000.00716.36
7.4.260.0030.00313.29
7.4.250.0040.00416.54
7.4.240.0000.00716.51
7.4.230.0030.00316.50
7.4.220.0100.01016.59
7.4.210.0100.00616.56
7.4.200.0030.00316.61
7.4.160.0120.00716.42
7.4.150.0070.01417.40
7.4.140.0080.01217.86
7.4.130.0160.00916.41
7.4.120.0100.00816.46
7.4.110.0070.01016.39
7.4.100.0040.01416.62
7.4.90.0040.01816.58
7.4.80.0000.01819.39
7.4.70.0070.01016.34
7.4.60.0000.01716.43
7.4.50.0030.01416.54
7.4.40.0030.01516.39
7.4.30.0070.01016.35
7.4.00.0070.01015.00
7.3.330.0000.00613.23
7.3.320.0000.00513.31
7.3.310.0070.00016.36
7.3.300.0020.00516.18
7.3.290.0030.00316.23
7.3.280.0090.00716.31
7.3.270.0080.00917.40
7.3.260.0070.01116.46
7.3.250.0130.00716.27
7.3.240.0130.00316.42
7.3.230.0130.00416.55
7.3.210.0030.01516.30
7.3.200.0120.00316.37
7.3.190.0160.00616.34
7.3.180.0070.01016.62
7.3.170.0100.00616.38
7.3.160.0080.00816.37
7.3.00.0100.00616.30
7.2.330.0120.00616.46
7.2.320.0100.00716.61
7.2.310.0090.00816.71
7.2.300.0180.00316.50
7.2.290.0080.00816.65
7.2.130.0100.00317.00
7.2.120.0000.01216.98
7.2.110.0110.00017.03
7.2.100.0100.00616.86
7.2.90.0260.00515.72
7.2.80.0870.00615.84
7.2.70.0540.01115.81
7.2.60.0030.01215.87
7.2.50.0620.00615.87
7.2.40.0970.01015.95
7.2.30.0670.01216.04
7.2.20.0440.00815.83
7.2.10.0100.00615.95
7.2.00.0060.00915.84
7.1.250.0110.00415.80
7.1.240.0030.00915.68
7.1.230.0040.00716.00
7.1.220.0060.00615.75
7.1.210.0070.00814.99
7.1.200.0560.00915.00
7.1.190.0780.01314.89
7.1.180.0700.00214.91
7.1.170.0570.00814.97
7.1.160.0570.00514.70
7.1.150.0090.00914.81
7.1.140.0580.00714.93
7.1.130.0120.00314.77
7.1.120.0080.00714.80
7.1.110.0580.00614.93
7.1.100.0110.00814.88
7.1.90.0070.00914.55
7.1.80.0100.00514.74
7.1.70.0170.00914.88
7.1.60.0160.01123.72
7.1.50.0700.01123.85
7.1.40.0850.01023.88
7.1.30.0950.01523.71
7.1.20.1000.01023.82
7.1.10.0750.00014.78
7.1.00.0360.00814.61
7.0.330.0050.00515.33
7.0.320.0120.00015.35
7.0.310.0860.00514.53
7.0.300.0530.00414.49
7.0.290.0420.01014.31
7.0.280.0130.00514.36
7.0.270.0120.00514.48
7.0.260.1140.00814.28
7.0.250.0400.00814.38
7.0.240.0140.00614.64
7.0.230.0520.00714.56
7.0.220.0700.00814.45
7.0.210.0180.00914.34
7.0.200.0400.00314.50
7.0.190.0650.00814.55
7.0.180.0800.00414.44
7.0.170.0900.00814.48
7.0.160.0750.00414.46
7.0.150.0650.00314.39
7.0.140.0740.00914.56
7.0.130.0080.00614.34
7.0.120.0040.01114.16
7.0.110.0050.00914.31
7.0.100.0410.00514.44
7.0.90.0080.00914.34
7.0.80.0070.00714.48
7.0.70.0170.01114.39
7.0.60.0050.01014.49
7.0.50.0430.00514.55
7.0.40.0510.00313.51
7.0.30.0140.00213.55
7.0.20.0100.00413.38
7.0.10.0160.00513.19
7.0.00.0280.00813.64
5.6.380.0120.00314.44

preferences:
61.67 ms | 401 KiB | 5 Q