3v4l.org

run code in 300+ PHP versions simultaneously
<?php $attachmentSizes = array('Galeria', 'Rss', 'Grande', 'Mediana'); $fotos = array(array('idAdjunto' => 1, 'tamano' => 'Grande'), array('idAdjunto' => 2, 'tamano'=>'Galeria'), array('idAdjunto' => 3, 'tamano'=>'Mediana')); $foto = array_filter($fotos, function($foto) use ($attachmentSizes) { return in_array($foto['tamano'], $attachmentSizes); }); $foto = array_shift($foto); var_dump($foto);

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.00916.49
8.3.50.0090.00916.23
8.3.40.0090.00618.67
8.3.30.0150.00018.66
8.3.20.0050.00318.78
8.3.10.0080.00020.61
8.3.00.0080.01219.26
8.2.180.0070.00716.63
8.2.170.0070.01422.96
8.2.160.0070.00721.07
8.2.150.0000.00724.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00419.36
8.2.110.0070.01119.39
8.2.100.0090.00317.97
8.2.90.0060.00319.48
8.2.80.0080.00019.26
8.2.70.0030.00517.50
8.2.60.0060.00318.05
8.2.50.0060.00318.07
8.2.40.0040.00418.34
8.2.30.0040.00418.18
8.2.20.0080.00017.68
8.2.10.0050.00217.85
8.2.00.0050.00217.71
8.1.280.0110.01125.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0000.00922.52
8.1.230.0060.00620.91
8.1.220.0040.00417.80
8.1.210.0000.00918.97
8.1.200.0030.00617.35
8.1.190.0040.00417.53
8.1.180.0070.00318.10
8.1.170.0040.00418.84
8.1.160.0040.00418.80
8.1.150.0040.00418.59
8.1.140.0040.00717.35
8.1.130.0000.00717.84
8.1.120.0040.00417.47
8.1.110.0000.00717.36
8.1.100.0030.00317.50
8.1.90.0040.00417.38
8.1.80.0000.00717.37
8.1.70.0040.00417.36
8.1.60.0060.00317.56
8.1.50.0080.00017.37
8.1.40.0040.00417.49
8.1.30.0070.00017.48
8.1.20.0000.00817.64
8.1.10.0040.00417.50
8.1.00.0070.00317.51
8.0.300.0030.00620.03
8.0.290.0000.00716.75
8.0.280.0040.00418.50
8.0.270.0030.00317.32
8.0.260.0080.00016.85
8.0.250.0020.00517.02
8.0.240.0030.00616.97
8.0.230.0000.00716.87
8.0.220.0030.00616.91
8.0.210.0000.00716.93
8.0.200.0030.00316.86
8.0.190.0030.00616.85
8.0.180.0070.00016.82
8.0.170.0030.00516.96
8.0.160.0050.00316.80
8.0.150.0060.00316.89
8.0.140.0040.00416.89
8.0.130.0000.00513.38
8.0.120.0070.00016.86
8.0.110.0000.00816.86
8.0.100.0030.00616.81
8.0.90.0040.00417.02
8.0.80.0090.00616.87
8.0.70.0070.00016.78
8.0.60.0050.00316.93
8.0.50.0040.00416.91
8.0.30.0100.00917.07
8.0.20.0100.00717.06
8.0.10.0000.00817.05
8.0.00.0070.01116.91
7.4.330.0020.00213.07
7.4.320.0040.00416.61
7.4.300.0000.00716.47
7.4.290.0030.00516.66
7.4.280.0060.00616.53
7.4.270.0000.00716.54
7.4.260.0030.00313.29
7.4.250.0060.00316.55
7.4.240.0070.00016.54
7.4.230.0030.00316.36
7.4.220.0110.00816.61
7.4.210.0050.01016.57
7.4.200.0030.00316.48
7.4.190.0000.00716.57
7.4.160.0110.00516.36
7.4.150.0090.00916.58
7.4.140.0110.00716.43
7.4.130.0080.01116.49
7.4.120.0120.00616.59
7.4.110.0110.00716.52
7.4.100.0100.01016.54
7.4.90.0130.00316.39
7.4.80.0060.01519.39
7.4.70.0080.00816.61
7.4.60.0000.01716.42
7.4.50.0000.00816.42
7.4.40.0040.00716.26
7.4.30.0130.00616.64
7.4.00.0030.01315.15
7.3.330.0030.00313.45
7.3.320.0000.00513.36
7.3.310.0000.00716.25
7.3.300.0070.00016.34
7.3.290.0110.00716.28
7.3.280.0120.00716.34
7.3.270.0100.00716.53
7.3.260.0100.01316.46
7.3.250.0080.01116.40
7.3.240.0060.01016.29
7.3.230.0140.00716.61
7.3.210.0100.00616.63
7.3.200.0090.00916.52
7.3.190.0100.01016.43
7.3.180.0130.00316.41
7.3.170.0090.00816.36
7.3.160.0090.01216.33
7.3.120.0000.01514.94
7.2.330.0130.00416.51
7.2.320.0060.01216.75
7.2.310.0150.00916.70
7.2.300.0100.00616.58
7.2.290.0000.01816.77
7.2.00.0030.01219.35
7.1.70.0040.00417.11
7.1.60.0060.01919.40
7.1.50.0000.02217.04
7.1.00.0100.06722.40
7.0.200.0000.00816.78
7.0.140.0070.07321.97
7.0.120.0000.07722.05
7.0.60.0030.08319.93
7.0.50.0030.09017.90
7.0.40.0070.04320.18
7.0.30.0270.05320.09
7.0.20.0230.05320.07
7.0.10.0300.06320.10
7.0.00.0130.03720.31
5.6.280.0030.07320.99
5.6.210.0030.08720.73
5.6.200.0100.08018.16
5.6.190.0070.04720.63
5.6.180.0230.06020.50
5.6.170.0270.08320.62
5.6.160.0030.09320.56
5.6.150.0070.07018.29
5.6.140.0100.06718.18
5.6.130.0030.04018.15
5.6.120.0000.08721.12
5.6.110.0170.09020.97
5.6.100.0030.05720.96
5.6.90.0100.04721.00
5.6.80.0100.07320.51
5.6.70.4070.03320.43
5.5.350.0270.07320.34
5.5.340.0130.03717.95
5.5.330.0070.08720.43
5.5.320.0000.04320.37
5.5.310.0270.05320.28
5.5.300.0070.06318.09
5.5.290.0030.08317.98
5.5.280.0100.04720.68
5.5.270.0070.04320.86
5.5.260.0170.07320.82
5.5.250.0030.04720.60
5.5.240.0000.07720.16
5.4.450.1870.04019.57
5.4.440.1930.03319.32
5.4.430.1800.04019.54
5.4.420.1870.03319.55
5.4.410.1830.04019.11
5.4.400.2070.04319.00
5.4.390.2030.04019.09
5.4.380.1870.03319.09
5.4.370.1930.04019.24
5.4.360.2130.04318.84
5.4.350.1800.04319.31
5.4.340.1870.03719.13
5.4.320.1800.04719.07
5.4.310.2030.03319.00
5.4.300.1930.04019.21
5.4.290.1770.03718.98
5.4.280.2170.03719.14
5.4.270.1830.04019.16
5.4.260.1800.03319.01
5.4.250.2100.04019.16
5.4.240.1870.04019.08
5.4.230.2100.04019.00
5.4.220.2070.04018.94
5.4.210.2070.04019.21
5.4.200.2500.05319.34
5.4.190.3030.03719.20
5.4.180.2400.04019.20
5.4.170.2300.04318.83
5.4.160.2100.03319.29
5.4.150.2530.03719.19
5.4.140.2570.03316.34
5.4.130.1930.03716.37
5.4.120.2400.03316.50
5.4.110.2200.04316.55
5.4.100.2430.03716.45
5.4.90.2170.03316.57
5.4.80.2600.04716.40
5.4.70.2530.03316.54
5.4.60.2200.03316.43
5.4.50.2130.03316.38
5.4.40.2570.03016.52
5.4.30.2470.04016.33
5.4.20.2330.03716.48
5.4.10.2500.03716.53
5.4.00.2370.04015.81
5.3.290.2100.04314.70
5.3.280.2300.04314.49
5.3.270.2500.04014.52
5.3.260.2530.03714.57
5.3.250.2100.03714.53
5.3.240.1800.04014.56
5.3.230.1930.04014.82
5.3.220.1870.04014.57
5.3.210.2000.04314.79
5.3.200.1870.03314.68
5.3.190.2070.03314.57
5.3.180.1900.03314.64
5.3.170.1800.04014.68
5.3.160.1770.04014.57
5.3.150.1530.04014.67
5.3.140.1770.04014.66
5.3.130.1830.03714.77
5.3.120.1970.02714.79
5.3.110.1900.03314.77
5.3.100.1730.03313.97
5.3.90.1830.02714.24
5.3.80.1870.03714.24
5.3.70.1970.04014.14
5.3.60.1900.03014.05
5.3.50.2030.04013.88
5.3.40.1570.03714.10
5.3.30.1830.04013.82
5.3.20.1730.03013.78
5.3.10.1770.04313.57
5.3.00.2330.03313.56
5.2.170.1670.03010.99
5.2.160.1630.02711.03
5.2.150.1500.02711.05
5.2.140.1500.02711.08
5.2.130.1400.02311.05
5.2.120.1630.02311.01
5.2.110.1600.02011.12
5.2.100.1530.03011.01
5.2.90.1500.03010.95
5.2.80.1370.03310.93
5.2.70.1500.02711.14
5.2.60.1230.03011.13
5.2.50.1530.02310.95
5.2.40.1400.02710.83
5.2.30.1300.03010.91
5.2.20.1270.02011.00
5.2.10.1200.03310.94
5.2.00.1270.02710.71
5.1.60.1470.0279.98
5.1.50.1170.03010.16
5.1.40.1230.01710.10
5.1.30.1670.03010.38
5.1.20.1330.02310.46
5.1.10.1570.02710.05
5.1.00.1570.02710.15
5.0.50.0730.0178.53
5.0.40.0970.0278.47
5.0.30.1030.0438.14
5.0.20.0930.0278.14
5.0.10.0930.0308.14
5.0.00.0770.0438.23
4.4.90.0800.0138.14
4.4.80.1000.0178.14
4.4.70.0770.0178.14
4.4.60.0930.0238.14
4.4.50.0800.0178.14
4.4.40.0970.0378.14
4.4.30.0970.0178.14
4.4.20.1030.0208.14
4.4.10.0770.0208.14
4.4.00.0930.0308.14
4.3.110.0900.0208.14
4.3.100.0900.0108.14
4.3.90.0830.0208.14
4.3.80.0770.0338.14
4.3.70.0800.0238.14
4.3.60.0730.0178.14
4.3.50.0970.0208.14
4.3.40.0970.0338.14
4.3.30.0570.0208.14
4.3.20.0470.0238.14
4.3.10.0470.0138.14
4.3.00.0470.0278.14

preferences:
45.61 ms | 401 KiB | 5 Q