3v4l.org

run code in 300+ PHP versions simultaneously
<?php function checkname($arr, $name) { foreach (array_slice(func_get_args(), 1) as $name) { if (strpos($arr, $name) !== false) { return $name; } } return ''; } $autoName=json_decode('["image1","image3","image2","stores1","stores2","stores2","stores3","stores4","design1","design2"]',true); echo call_user_func_array("checkname",array_merge(array("image123456"),$autoName));

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.70.0080.00818.31
8.3.60.0140.00718.43
8.3.50.0110.00422.05
8.3.40.0030.01018.88
8.3.30.0070.00718.92
8.3.20.0050.00220.25
8.3.10.0040.00422.11
8.3.00.0040.00722.45
8.2.190.0070.01416.63
8.2.180.0040.01116.50
8.2.170.0100.00322.96
8.2.160.0110.00420.88
8.2.150.0040.00424.18
8.2.140.0100.00724.66
8.2.130.0030.00526.16
8.2.120.0040.00419.23
8.2.110.0060.00321.00
8.2.100.0040.00817.72
8.2.90.0050.00317.91
8.2.80.0080.00017.97
8.2.70.0000.00817.50
8.2.60.0030.00517.93
8.2.50.0030.00518.07
8.2.40.0060.00319.95
8.2.30.0070.00018.05
8.2.20.0040.00417.70
8.2.10.0050.00317.55
8.2.00.0000.00717.55
8.1.280.0170.00325.92
8.1.270.0040.01122.07
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0060.00623.99
8.1.230.0080.00420.89
8.1.220.0050.00317.74
8.1.210.0040.00418.91
8.1.200.0120.00017.35
8.1.190.0040.00417.63
8.1.180.0030.00518.60
8.1.170.0030.00618.56
8.1.160.0040.00421.91
8.1.150.0000.00718.55
8.1.140.0090.00017.35
8.1.130.0030.00317.77
8.1.120.0000.00717.48
8.1.110.0040.00417.49
8.1.100.0050.00317.37
8.1.90.0030.00317.34
8.1.80.0050.00317.45
8.1.70.0040.00417.38
8.1.60.0060.00317.57
8.1.50.0060.00317.45
8.1.40.0000.00917.32
8.1.30.0040.00417.69
8.1.20.0080.00017.66
8.1.10.0040.00417.39
8.1.00.0040.00417.43
8.0.300.0000.00819.98
8.0.290.0050.00317.05
8.0.280.0030.00318.43
8.0.270.0030.00517.27
8.0.260.0060.00016.81
8.0.250.0040.00416.96
8.0.240.0040.00416.84
8.0.230.0050.00316.93
8.0.220.0000.00716.91
8.0.210.0000.00716.82
8.0.200.0030.00316.80
8.0.190.0040.00416.94
8.0.180.0040.00416.77
8.0.170.0040.00416.80
8.0.160.0030.00516.76
8.0.150.0050.00216.72
8.0.140.0070.00016.79
8.0.130.0000.00513.31
8.0.120.0000.00816.72
8.0.110.0030.00316.78
8.0.100.0070.00016.73
8.0.90.0000.00716.78
8.0.80.0120.00316.84
8.0.70.0000.00716.91
8.0.60.0050.00216.75
8.0.50.0080.00016.92
8.0.30.0090.01017.10
8.0.20.0130.00717.40
8.0.10.0040.00417.02
8.0.00.0150.00516.80
7.4.330.0050.00015.00
7.4.320.0030.00316.51
7.4.300.0000.00616.48
7.4.290.0030.00316.41
7.4.280.0030.00316.65
7.4.270.0040.00416.48
7.4.260.0050.00316.57
7.4.250.0070.00016.46
7.4.240.0040.00416.52
7.4.230.0070.00016.62
7.4.220.0030.01516.67
7.4.210.0090.00616.56
7.4.200.0030.00316.62
7.4.190.0040.00416.76
7.4.160.0070.00716.78
7.4.150.0100.00717.40
7.4.140.0100.00817.86
7.4.130.0070.01116.42
7.4.120.0060.01416.36
7.4.110.0090.01216.60
7.4.100.0150.00716.49
7.4.90.0100.00716.57
7.4.80.0090.00919.39
7.4.70.0100.00616.55
7.4.60.0100.00616.71
7.4.50.0050.00016.71
7.4.40.0070.00722.77
7.4.30.0130.00316.46
7.4.00.0030.01214.88
7.3.330.0000.00613.25
7.3.320.0000.00513.15
7.3.310.0040.00416.22
7.3.300.0040.00416.11
7.3.290.0030.01016.22
7.3.280.0070.01016.25
7.3.270.0040.01517.40
7.3.260.0120.00916.47
7.3.250.0070.01016.38
7.3.240.0040.01616.39
7.3.230.0090.00916.39
7.3.210.0130.00616.43
7.3.200.0120.00419.39
7.3.190.0110.00716.41
7.3.180.0040.01116.28
7.3.170.0070.01016.48
7.3.160.0100.00616.36
7.3.120.0110.00414.62
7.2.330.0100.00716.64
7.2.320.0030.01716.62
7.2.310.0070.01016.72
7.2.300.0140.00416.59
7.2.290.0130.00316.63
7.2.00.0030.00819.10
7.1.200.0000.01115.46
7.1.100.0190.00718.02
7.1.70.0040.00416.86
7.1.60.0090.01519.82
7.1.50.0040.02116.64
7.1.00.0030.06722.30
7.0.200.0030.00716.54
7.0.140.0070.07022.15
7.0.70.4330.03719.95
7.0.60.0070.07020.00
7.0.50.0030.05017.85
7.0.40.0100.08719.96
7.0.30.0370.06720.30
7.0.20.0200.03720.30
7.0.10.0300.08320.19
7.0.00.0030.04320.25
5.6.280.0130.06321.11
5.6.210.0100.05720.50
5.6.200.0130.07718.19
5.6.190.0100.08020.55
5.6.180.0200.04020.74
5.6.170.0200.03720.55
5.6.160.0070.04720.44
5.6.150.0100.06318.14
5.6.140.0070.03718.28
5.6.130.0070.04318.15
5.6.120.0030.04721.02
5.6.110.0000.09320.96
5.6.100.0070.04021.01
5.6.90.0030.07021.10
5.6.80.0130.07720.38
5.6.70.0300.07020.41
5.5.350.0100.07720.45
5.5.340.0200.04717.97
5.5.330.0200.07020.40
5.5.320.0030.08320.27
5.5.310.0270.04320.24
5.5.300.0070.08018.07
5.5.290.0100.08017.98
5.5.280.0130.07020.77
5.5.270.0070.04020.94
5.5.260.0200.07020.77
5.5.250.0100.03320.59
5.5.240.0070.07720.27
5.4.450.2830.04019.17
5.4.440.2800.03319.49
5.4.430.2800.04019.31
5.4.420.2700.04019.16
5.4.410.2700.04319.42
5.4.400.2730.03718.98
5.4.390.2700.04019.06
5.4.380.2700.04719.08
5.4.370.2870.03018.84
5.4.360.0430.06019.09
5.4.350.0130.03318.97
5.4.340.0030.04719.20
5.4.320.0030.08319.13
5.4.310.2700.04019.34
5.4.300.2870.03719.07
5.4.290.2500.04318.86
5.4.280.2470.04718.86
5.4.270.2600.04319.22
5.4.260.2800.04319.15
5.4.250.2730.04019.25
5.4.240.2730.04018.99
5.4.230.1830.03719.21
5.4.220.0030.04719.05
5.4.210.0100.07019.21
5.4.200.1370.06719.12
5.4.190.2830.03319.05
5.4.180.2930.03719.21
5.4.170.2900.04018.86
5.4.160.2600.03718.96
5.4.150.2870.04019.18
5.4.140.2600.03016.50
5.4.130.2530.03716.67
5.4.120.2600.03316.33
5.4.110.2500.04016.46
5.4.100.2600.04016.54
5.4.90.2530.03716.36
5.4.80.3100.03316.26
5.4.70.3070.04016.39
5.4.60.2600.03016.54
5.4.50.2530.03016.53
5.4.40.2500.04016.17
5.4.30.3100.03716.24
5.4.20.3330.04016.55
5.4.10.2770.03316.16
5.4.00.2430.04015.75
5.3.290.2930.03714.78
5.3.280.2770.03314.50
5.3.270.2770.04314.52
5.3.260.2570.03314.63
5.3.250.2600.03714.51
5.3.240.2770.03714.75
5.3.230.2470.03714.60
5.3.220.2770.04014.79
5.3.210.2900.03714.44
5.3.200.2600.03314.59
5.3.190.2730.03714.56
5.3.180.2970.03714.54
5.3.170.2770.04014.71
5.3.160.2670.04014.47
5.3.150.2630.03014.62
5.3.140.2700.04014.78
5.3.130.2700.04714.45
5.3.120.2870.03714.45
5.3.110.2670.03314.55
5.3.100.2700.04314.04
5.3.90.2670.04313.93
5.3.80.2630.04713.97
5.3.70.2700.03713.91
5.3.60.2470.03714.23
5.3.50.2800.04714.07
5.3.40.2630.02714.10
5.3.30.2670.04013.96
5.3.20.2600.03313.70
5.3.10.2600.03013.57
5.3.00.3000.04713.64
5.2.170.2370.03311.02
5.2.160.1270.02711.37
5.2.150.0030.03711.05
5.2.140.0000.03711.20
5.2.130.0330.03010.96
5.2.120.1730.03011.04
5.2.110.2170.03011.23
5.2.100.2500.03711.06
5.2.90.2170.02311.02
5.2.80.2400.03011.10
5.2.70.2200.03311.10
5.2.60.2570.03011.05
5.2.50.2270.03311.16
5.2.40.1770.02710.90
5.2.30.2030.03310.98
5.2.20.1470.02710.96
5.2.10.1700.02710.80
5.2.00.1670.02710.63
5.1.60.1330.03010.08
5.1.50.2000.02710.22
5.1.40.1670.02310.14
5.1.30.1870.02310.56
5.1.20.1900.02010.26
5.1.10.1970.0209.95
5.1.00.1630.03010.02
5.0.50.0730.0138.43
5.0.40.1070.0238.41
5.0.30.1030.0378.21
5.0.20.0970.0138.10
5.0.10.1000.0208.11
5.0.00.0900.0338.24
4.4.90.1070.0237.16
4.4.80.1030.0237.16
4.4.70.0900.0207.16
4.4.60.0970.0137.16
4.4.50.0900.0137.16
4.4.40.1000.0307.16
4.4.30.1070.0137.16
4.4.20.0970.0177.16
4.4.10.1030.0177.16
4.4.00.1000.0277.16
4.3.110.0900.0207.16
4.3.100.0830.0177.16
4.3.90.1030.0107.16
4.3.80.1030.0307.16
4.3.70.1100.0137.16
4.3.60.1070.0137.16
4.3.50.0530.0277.16
4.3.40.0000.0277.16
4.3.30.0030.0307.16
4.3.20.0030.0207.16
4.3.10.0000.0237.16
4.3.00.0000.0207.16

preferences:
60.69 ms | 401 KiB | 5 Q