3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allLanguages = ['en', 'es', 'fr']; $values = ['es' => 'Spanish1']; $filesContent = [ 'foo' => [ 'es' => ['bar' => 'Spanish2'], 'fr' => ['bar' => 'French'] ] ]; $fileName = 'foo'; $key = 'bar'; $original = []; foreach ($allLanguages as $languageKey) { $original[$languageKey] = $values[$languageKey] ?? $filesContent[$fileName][$languageKey][$key] ?? ''; } var_export($original);

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.4.20.0100.01020.77
8.4.10.0060.00320.60
8.3.150.0090.00920.81
8.3.140.0080.00016.75
8.3.130.0100.00718.61
8.3.120.0040.00420.61
8.3.110.0060.00320.94
8.3.100.0080.00024.06
8.3.90.0040.00426.77
8.3.80.0090.00016.50
8.3.70.0090.01316.61
8.3.60.0070.01416.75
8.3.50.0120.00524.52
8.3.40.0070.00718.54
8.3.30.0110.00419.27
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0070.00026.16
8.2.260.0100.00718.63
8.2.250.0070.00316.68
8.2.240.0060.00318.71
8.2.230.0030.00522.58
8.2.220.0100.00037.54
8.2.210.0050.01426.77
8.2.200.0060.00316.63
8.2.190.0140.00718.29
8.2.180.0070.01125.92
8.2.170.0140.00722.96
8.2.160.0140.00322.96
8.2.150.0070.00025.66
8.2.140.0090.00024.66
8.2.130.0070.00026.16
8.2.120.0050.00321.04
8.2.110.0120.00620.39
8.2.100.0040.00717.91
8.2.90.0030.00518.34
8.2.80.0000.00817.97
8.2.70.0030.00518.05
8.2.60.0000.00818.34
8.2.50.0000.00818.10
8.2.40.0000.00720.39
8.2.30.0040.00618.66
8.2.20.0030.00518.04
8.2.10.0040.00418.45
8.2.00.0020.00618.48
8.1.310.0110.00316.63
8.1.300.0080.00820.03
8.1.290.0090.00018.88
8.1.280.0140.00325.92
8.1.270.0040.00423.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00719.13
8.1.230.0110.00022.22
8.1.220.0000.00817.74
8.1.210.0050.00318.95
8.1.200.0090.00017.22
8.1.190.0000.00817.23
8.1.180.0060.00318.10
8.1.170.0040.00418.89
8.1.160.0030.00618.88
8.1.150.0070.00018.75
8.1.140.0060.00518.17
8.1.130.0070.00518.36
8.1.120.0070.00517.43
8.1.110.0060.00417.45
8.1.100.0060.00617.53
8.1.90.0070.00517.41
8.1.80.0060.00617.50
8.1.70.0100.00417.43
8.1.60.0130.00417.59
8.1.50.0110.00517.44
8.1.40.0090.00717.53
8.1.30.0100.00617.65
8.1.20.0130.00317.62
8.1.10.0080.00517.47
8.1.00.0090.00617.38
8.0.300.0070.00019.84
8.0.290.0080.00016.75
8.0.280.0070.00417.89
8.0.270.0110.00616.73
8.0.260.0080.00216.76
8.0.250.0090.00316.90
8.0.240.0020.00916.91
8.0.230.0050.00416.79
8.0.220.0020.00716.78
8.0.210.0030.00716.78
8.0.200.0040.00616.83
8.0.190.0120.00116.82
8.0.180.0080.00416.85
8.0.170.0070.00816.88
8.0.160.0080.00616.89
8.0.150.0100.00316.75
8.0.140.0050.00616.79
8.0.130.0080.00415.94
8.0.120.0050.00616.23
8.0.110.0060.00416.40
8.0.100.0060.00516.24
8.0.90.0040.00716.33
8.0.80.0080.00616.43
8.0.70.0090.00616.24
8.0.60.0080.00616.25
8.0.50.0080.00716.23
8.0.30.0080.00616.47
8.0.20.0090.00616.51
8.0.10.0070.00816.49
8.0.00.0120.00616.60
7.4.330.0120.00417.01
7.4.320.0070.00416.54
7.4.300.0090.00616.47
7.4.290.0080.00516.47
7.4.280.0110.00516.50
7.4.270.0040.00616.48
7.4.260.0100.00216.42
7.4.250.0060.00615.94
7.4.240.0090.00316.07
7.4.230.0060.00616.01
7.4.220.0080.00316.03
7.4.210.0090.00416.30
7.4.200.0100.00515.93
7.4.190.0070.00816.05
7.4.180.0110.00416.05
7.4.160.0100.00516.14
7.4.150.0070.00816.12
7.4.140.0080.00715.99
7.4.130.0110.00716.14
7.4.120.0080.00916.11
7.4.110.0110.00716.11
7.4.100.0090.00816.15
7.4.90.0090.00816.11
7.4.80.0120.00616.42
7.4.70.0120.00616.14
7.4.60.0100.00716.12
7.4.50.0110.00616.09
7.4.40.0110.00616.11
7.4.30.0080.00916.17
7.4.20.0120.00516.16
7.4.10.0090.00716.10
7.4.00.0080.00916.54
7.3.330.0100.00516.20
7.3.320.0100.00515.05
7.3.310.0090.00515.76
7.3.300.0110.00315.71
7.3.290.0080.00616.02
7.3.280.0120.00415.96
7.3.270.0110.00615.89
7.3.260.0100.00715.97
7.3.250.0090.00915.97
7.3.240.0120.00516.11
7.3.230.0110.00816.00
7.3.220.0120.00615.88
7.3.210.0160.00316.03
7.3.200.0110.00716.05
7.3.190.0110.00716.06
7.3.180.0130.00615.96
7.3.170.0130.00616.03
7.3.160.0100.00616.00
7.3.150.0110.00716.05
7.3.140.0130.00516.05
7.3.130.0120.00715.97
7.3.120.0130.00616.03
7.3.110.0120.00715.97
7.3.100.0120.00715.94
7.3.90.0130.00616.20
7.3.80.0110.00716.02
7.3.70.0130.00616.05
7.3.60.0100.00816.13
7.3.50.0110.00716.11
7.3.40.0130.00516.13
7.3.30.0110.00716.10
7.3.20.0130.00516.79
7.3.10.0140.00616.76
7.3.00.0150.00416.71
7.2.340.0130.00716.00
7.2.330.0140.00716.11
7.2.320.0150.00516.10
7.2.310.0130.00716.13
7.2.300.0120.00616.13
7.2.290.0100.00816.16
7.2.280.0140.00616.16
7.2.270.0110.00816.15
7.2.260.0130.00716.11
7.2.250.0130.00516.12
7.2.240.0120.00616.10
7.2.230.0130.00516.11
7.2.220.0120.00716.09
7.2.210.0100.00816.17
7.2.200.0120.00616.30
7.2.190.0110.00816.18
7.2.180.0110.00716.18
7.2.170.0100.00716.28
7.2.160.0100.00816.28
7.2.150.0320.00516.90
7.2.140.0120.00716.96
7.2.130.0130.00717.05
7.2.120.0130.00616.98
7.2.110.0110.00717.00
7.2.100.0100.00817.02
7.2.90.0110.00816.91
7.2.80.0140.00916.97
7.2.70.0140.00616.96
7.2.60.0140.00816.96
7.2.50.0120.00816.97
7.2.40.0150.00717.03
7.2.30.0170.00816.99
7.2.20.0140.00717.05
7.2.10.0160.00516.99
7.2.00.0130.00817.06

preferences:
42.9 ms | 403 KiB | 5 Q