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] = $filesContent[$fileName][$languageKey][$key] ?? $values[$languageKey] ?? ''; } 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.0130.01020.65
8.4.10.0060.01022.34
8.3.150.0070.01116.93
8.3.140.0090.00917.12
8.3.130.0060.00318.21
8.3.120.0090.00020.60
8.3.110.0060.00320.94
8.3.100.0050.00324.06
8.3.90.0040.00426.77
8.3.80.0060.00316.50
8.3.70.0130.00916.58
8.3.60.0150.00316.36
8.3.50.0080.00824.47
8.3.40.0120.00418.70
8.3.30.0140.00019.35
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0070.00026.16
8.2.270.0090.00916.77
8.2.260.0000.00817.14
8.2.250.0160.00017.09
8.2.240.0090.00017.26
8.2.230.0060.00922.58
8.2.220.0060.00337.54
8.2.210.0130.00026.77
8.2.200.0080.00416.63
8.2.190.0070.00716.58
8.2.180.0070.00725.92
8.2.170.0100.01022.96
8.2.160.0110.00322.96
8.2.150.0040.00425.66
8.2.140.0000.00724.66
8.2.130.0080.00026.16
8.2.120.0000.00726.35
8.2.110.0040.00420.41
8.2.100.0060.00617.91
8.2.90.0040.00417.63
8.2.80.0040.00418.78
8.2.70.0030.00617.93
8.2.60.0000.00818.09
8.2.50.0030.00619.47
8.2.40.0000.00921.04
8.2.30.0040.00419.22
8.2.20.0000.00718.13
8.2.10.0040.00419.18
8.2.00.0000.00719.24
8.1.310.0040.00416.80
8.1.300.0130.00718.29
8.1.290.0090.00030.84
8.1.280.0100.00725.92
8.1.270.0080.00024.66
8.1.260.0030.00628.09
8.1.250.0000.00728.09
8.1.240.0000.00922.20
8.1.230.0110.00020.90
8.1.220.0030.00617.79
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0000.00917.35
8.1.180.0050.00318.94
8.1.170.0000.00918.46
8.1.160.0070.00018.93
8.1.150.0000.00818.84
8.1.140.0080.00018.90
8.1.130.0000.00717.32
8.1.120.0000.00717.51
8.1.110.0030.00317.52
8.1.100.0000.00717.35
8.1.90.0000.00717.53
8.1.80.0040.00417.52
8.1.70.0000.00917.33
8.1.60.0080.00017.61
8.1.50.0040.00417.46
8.1.40.0050.00317.44
8.1.30.0090.00017.59
8.1.20.0050.00317.59
8.1.10.0040.00417.50
8.1.00.0000.01217.46
8.0.300.0050.00518.77
8.0.290.0000.00716.75
8.0.280.0000.00718.45
8.0.270.0060.00716.74
8.0.260.0000.00716.73
8.0.250.0000.00716.96
8.0.240.0000.00716.97
8.0.230.0030.00516.96
8.0.220.0030.00316.93
8.0.210.0000.00716.88
8.0.200.0050.00316.96
8.0.190.0000.00716.95
8.0.180.0030.00616.95
8.0.170.0060.00316.88
8.0.160.0040.00416.86
8.0.150.0040.00416.92
8.0.140.0000.00716.87
8.0.130.0030.00313.38
8.0.120.0050.00316.78
8.0.110.0000.00716.90
8.0.100.0030.00516.88
8.0.90.0040.00416.93
8.0.80.0080.01016.93
8.0.70.0040.00416.88
8.0.60.0040.00416.79
8.0.50.0040.00416.88
8.0.30.0100.00717.26
8.0.20.0120.00917.00
8.0.10.0030.00316.86
8.0.00.0100.01016.69
7.4.330.0000.00415.55
7.4.320.0040.00416.40
7.4.300.0000.00716.61
7.4.290.0070.00016.61
7.4.280.0000.00816.64
7.4.270.0070.00516.76
7.4.260.0050.00013.34
7.4.250.0030.00316.53
7.4.240.0030.00316.54
7.4.230.0030.00316.45
7.4.220.0000.00816.60
7.4.210.0050.01016.53
7.4.200.0030.00316.64
7.4.130.0080.01116.40
7.4.120.0060.01316.40
7.4.110.0140.00416.48
7.4.100.0140.01116.42
7.4.90.0120.00916.40
7.4.80.0150.00917.45
7.4.70.0150.00916.55
7.4.60.0170.00616.49
7.4.50.0120.00916.35
7.4.40.0130.00916.29
7.4.30.0100.01116.31
7.4.20.0140.00616.28
7.4.10.0130.00816.33
7.4.00.0080.00916.47
7.3.330.0030.00316.37
7.3.320.0060.00013.25
7.3.310.0040.00416.28
7.3.300.0070.00016.28
7.3.290.0070.00016.24
7.3.260.0180.00616.38
7.3.240.0090.00816.34
7.3.230.0110.00816.36
7.3.220.0120.01316.45
7.3.210.0170.00716.41
7.3.200.0140.01016.31
7.3.190.0160.00616.43
7.3.180.0140.01116.41
7.3.170.0170.00716.31
7.3.160.0150.00816.35
7.3.150.0160.00416.39
7.3.140.0170.01216.28
7.3.130.0140.00616.40
7.3.120.0110.00916.43
7.3.110.0110.01216.36
7.3.100.0130.00816.32
7.3.90.0140.00716.48
7.3.80.0120.01016.48
7.3.70.0110.01016.39
7.3.60.0100.01116.33
7.3.50.0120.00916.38
7.3.40.0110.01016.34
7.3.30.0140.00716.28
7.3.20.0130.00916.42
7.3.10.0120.01016.41
7.3.00.0160.00616.46
7.2.340.0040.01216.64
7.2.330.0130.01016.69
7.2.320.0180.00916.62
7.2.310.0140.01116.53
7.2.300.0080.01316.66
7.2.290.0100.01016.51
7.2.280.0110.00916.63
7.2.270.0110.01016.37
7.2.260.0130.00816.55
7.2.250.0110.01116.46
7.2.240.0140.00916.54
7.2.230.0110.01116.66
7.2.220.0130.00916.53
7.2.210.0140.00916.46
7.2.200.0120.01016.59
7.2.190.0130.00816.57
7.2.180.0160.00516.53
7.2.170.0110.01116.55
7.2.160.0110.01016.49
7.2.150.0100.01216.69
7.2.140.0150.00816.63
7.2.130.0180.01216.64
7.2.120.0090.01216.59
7.2.110.0110.00816.57
7.2.100.0180.00516.64
7.2.90.0090.01116.40
7.2.80.0120.00916.56
7.2.70.0130.00716.66
7.2.60.0140.00616.57
7.2.50.0090.01216.62
7.2.40.0110.01416.71
7.2.30.0220.00616.68
7.2.20.0180.00616.63
7.2.10.0120.01116.60
7.2.00.0170.00716.58
7.1.330.0250.00515.66
7.1.320.0250.00715.64
7.1.310.0180.01115.59
7.1.300.0180.01215.62
7.1.290.0240.00915.52
7.1.280.0200.00815.55
7.1.270.0180.00915.50
7.1.260.0690.00815.30
7.1.250.0200.01015.40
7.1.240.0220.00615.48
7.1.230.0300.00415.41
7.1.220.0190.01115.55
7.1.210.0190.01015.69
7.1.200.0120.01615.70
7.1.190.0220.00915.28
7.1.180.0210.01215.35
7.1.170.0300.01715.45
7.1.160.0190.01015.53
7.1.150.0230.00815.54
7.1.140.0200.01015.55
7.1.130.0210.01115.63
7.1.120.0240.00615.62
7.1.110.0230.00815.55
7.1.100.0240.00715.61
7.1.90.0290.00615.76
7.1.80.0330.01915.47
7.1.70.0230.00915.48
7.1.60.0220.00715.31
7.1.50.0190.01415.64
7.1.40.0240.01215.60
7.1.30.0250.00415.44
7.1.20.0160.01615.66
7.1.10.0170.01215.36
7.1.00.0220.00715.48
7.0.330.0230.00315.08
7.0.320.0160.01315.32
7.0.310.0210.01115.21
7.0.300.0220.01015.38
7.0.290.0140.01515.16
7.0.280.0140.01415.23
7.0.270.0190.00815.22
7.0.260.0210.01115.21
7.0.250.0280.00015.43
7.0.240.0240.01015.39
7.0.230.0410.00815.19
7.0.220.0250.01015.27
7.0.210.0220.00615.27
7.0.200.0340.01115.42
7.0.190.0280.00315.24
7.0.180.0120.01615.41
7.0.170.0190.01115.29
7.0.160.0160.01015.32
7.0.150.0220.00615.31
7.0.140.0250.00415.49
7.0.130.0200.00815.31
7.0.120.0190.00815.28
7.0.110.0160.01615.33
7.0.100.0680.01015.28
7.0.90.0240.00315.25
7.0.80.0200.00715.12
7.0.70.0220.00415.07
7.0.60.0230.00615.25
7.0.50.0250.00315.16
7.0.40.0230.00815.25
7.0.30.0180.00915.13
7.0.20.0130.01315.16
7.0.10.0170.01015.29
7.0.00.0160.01015.19
5.6.400.0220.00815.61
5.6.390.0160.02015.77
5.6.380.0170.01415.64
5.6.370.0260.00315.86
5.6.360.0230.00615.66
5.6.350.0180.01115.89
5.6.340.0200.01215.42
5.6.330.0120.01815.81
5.6.320.0200.01015.76
5.6.310.0210.01115.73
5.6.300.0260.00615.79
5.6.290.0230.00715.68
5.6.280.0220.00715.76
5.6.270.0210.00915.72
5.6.260.0260.00815.84
5.6.250.0120.02115.71
5.6.240.0180.01415.81
5.6.230.0140.01415.48
5.6.220.0270.00815.62
5.6.210.0250.00415.66
5.6.200.0240.01215.72
5.6.190.0220.00815.78
5.6.180.0190.01015.65
5.6.170.0160.01215.82
5.6.160.0200.00815.66
5.6.150.0260.01015.62
5.6.140.0190.01015.78
5.6.130.0290.00615.62
5.6.120.0180.01215.55
5.6.110.0170.01415.61
5.6.100.0190.01315.73
5.6.90.0180.01115.73
5.6.80.0190.01215.59
5.6.70.0210.01015.63
5.6.60.0170.01415.49
5.6.50.0220.00715.73
5.6.40.0210.00815.55
5.6.30.0150.01315.70
5.6.20.0170.01015.66
5.6.10.0180.00915.54
5.6.00.0170.01515.71
5.5.380.0170.01315.62
5.5.370.0180.01215.71
5.5.360.0150.01715.59
5.5.350.0190.01815.75
5.5.340.0190.01615.35
5.5.330.0220.00715.64
5.5.320.0200.01015.31
5.5.310.0270.00915.46
5.5.300.0290.00615.75
5.5.290.0180.01015.49
5.5.280.0250.00815.40
5.5.270.0190.01515.70
5.5.260.0160.01615.64
5.5.250.0190.01115.51
5.5.240.0160.01215.34
5.5.230.0200.00715.57
5.5.220.0190.01115.67
5.5.210.0180.01115.54
5.5.200.0150.01415.66
5.5.190.0280.00015.45
5.5.180.0240.00515.59
5.5.170.0230.00815.16
5.5.160.0200.01015.53
5.5.150.0130.01615.21
5.5.140.0230.00815.63
5.5.130.0160.01215.41
5.5.120.0110.02115.33
5.5.110.0250.00315.50
5.5.100.0190.01015.43
5.5.90.0250.00415.57
5.5.80.0190.00915.68
5.5.70.0170.01115.43
5.5.60.0190.00915.36
5.5.50.0190.00915.39
5.5.40.0190.00915.41
5.5.30.0110.01715.25
5.5.20.0280.00915.38
5.5.10.0210.01115.71
5.5.00.0220.00715.59
5.4.450.0180.00412.52
5.4.440.0150.00912.42
5.4.430.0160.00712.36
5.4.420.0150.00612.36
5.4.410.0110.01112.47
5.4.400.0150.00612.36
5.4.390.0140.00712.36
5.4.380.0140.00912.36
5.4.370.0180.00412.36
5.4.360.0130.00912.36
5.4.350.0170.00412.57
5.4.340.0180.00412.36
5.4.330.0130.01012.36
5.4.320.0190.00512.36
5.4.310.0180.00412.36
5.4.300.0160.00512.36
5.4.290.0110.01112.36
5.4.280.0140.00712.36
5.4.270.0110.01112.36
5.4.260.0120.00912.52
5.4.250.0190.00312.49
5.4.240.0110.01112.52
5.4.230.0150.00912.53
5.4.220.0090.01312.36
5.4.210.0140.00912.46
5.4.200.0130.00912.36
5.4.190.0230.00612.50
5.4.180.0120.01212.45
5.4.170.0130.01012.48
5.4.160.0060.01712.36
5.4.150.0130.00912.36
5.4.140.0210.00712.38
5.4.130.0100.01112.38
5.4.120.0150.00612.36
5.4.110.0180.01112.56
5.4.100.0100.01012.36
5.4.90.0090.01212.36
5.4.80.0170.00412.46
5.4.70.0130.01012.58
5.4.60.0150.00912.57
5.4.50.0140.00712.36
5.4.40.0090.01412.38
5.4.30.0180.01012.47
5.4.20.0120.00912.36
5.4.10.0180.01112.48
5.4.00.0140.00712.36
5.3.290.0200.00612.77
5.3.280.0220.00412.60
5.3.270.0150.01012.88
5.3.260.0110.01112.60
5.3.250.0100.01312.82
5.3.240.0200.00412.61
5.3.230.0170.00712.66
5.3.220.0190.00312.78
5.3.210.0090.01312.61
5.3.200.0100.01312.87
5.3.190.0110.01112.60
5.3.180.0120.01212.82
5.3.170.0170.00712.84
5.3.160.0070.01612.91
5.3.150.0140.01012.90
5.3.140.0180.00912.89
5.3.130.0140.01112.79
5.3.120.0180.01212.88
5.3.110.0170.00712.70
5.3.100.0090.01212.76
5.3.90.0180.00412.79
5.3.80.0110.01112.67
5.3.70.0170.00612.79
5.3.60.0150.00612.69
5.3.50.0170.00412.63
5.3.40.0200.00412.62
5.3.30.0110.01112.79
5.3.20.0180.00412.54
5.3.10.0120.00912.36
5.3.00.0160.01012.61
5.2.170.0090.00812.36
5.2.160.0140.00712.36
5.2.150.0070.01112.36
5.2.140.0110.00712.36
5.2.130.0110.00812.36
5.2.120.0110.00712.36
5.2.110.0100.00912.36
5.2.100.0110.00812.36
5.2.90.0150.00812.36
5.2.80.0160.00712.36
5.2.70.0130.00612.36
5.2.60.0140.00712.36
5.2.50.0130.00912.36
5.2.40.0080.01212.36
5.2.30.0120.00812.36
5.2.20.0090.00912.36
5.2.10.0090.00912.36
5.2.00.0140.00612.36
5.1.60.0090.00612.36
5.1.50.0150.00412.36
5.1.40.0090.00612.36
5.1.30.0080.01112.36
5.1.20.0150.00312.36
5.1.10.0140.00312.36
5.1.00.0130.00612.36
5.0.50.0110.00712.36
5.0.40.0090.00512.36
5.0.30.0080.00812.36
5.0.20.0060.00912.36
5.0.10.0140.00012.36
5.0.00.0090.00312.36
4.4.90.0080.00412.36
4.4.80.0070.00412.36
4.4.70.0080.00012.36
4.4.60.0080.00012.36
4.4.50.0060.00312.36
4.4.40.0040.00412.36
4.4.30.0030.00612.36
4.4.20.0060.00312.36
4.4.10.0000.00912.36
4.4.00.0000.00912.36
4.3.110.0060.00412.36
4.3.100.0080.00012.36
4.3.90.0050.00512.36
4.3.80.0090.00012.36
4.3.70.0090.00012.36
4.3.60.0000.00912.36
4.3.50.0050.00512.36
4.3.40.0050.00412.36
4.3.30.0000.00912.36
4.3.20.0000.00912.36
4.3.10.0070.00012.36
4.3.00.0060.00212.36

preferences:
77.83 ms | 403 KiB | 5 Q