3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array("a_b_c"); $array2 = array("a","c","d","e"); $promotion = explode($array1, "_"); foreach($promotion as $promo) { if(in_array($promo,$array2)) { print_r($promo); } }

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.0150.00018.31
8.3.60.0110.00416.50
8.3.50.0110.00521.99
8.3.40.0110.00418.79
8.3.30.0100.00318.90
8.3.20.0040.00420.34
8.3.10.0040.00423.47
8.3.00.0080.00019.38
8.2.180.0050.01016.63
8.2.170.0090.00622.96
8.2.160.0100.00320.45
8.2.150.0030.00624.18
8.2.140.0000.00824.66
8.2.130.0080.00026.16
8.2.120.0000.00722.07
8.2.110.0040.00422.24
8.2.100.0090.00317.83
8.2.90.0040.00417.75
8.2.80.0000.00817.97
8.2.70.0050.00317.93
8.2.60.0040.00417.93
8.2.50.0000.00918.10
8.2.40.0000.00820.61
8.2.30.0000.00817.98
8.2.20.0040.00417.69
8.2.10.0000.00919.78
8.2.00.0070.00417.62
8.1.280.0060.01225.92
8.1.270.0040.00421.92
8.1.260.0030.00626.35
8.1.250.0000.00728.09
8.1.240.0000.00823.96
8.1.230.0000.01220.75
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.13
8.1.190.0100.00517.09
8.1.180.0040.00418.10
8.1.170.0060.00318.59
8.1.160.0000.00721.95
8.1.150.0040.00418.48
8.1.140.0040.00417.39
8.1.130.0030.00317.73
8.1.120.0030.00717.31
8.1.110.0040.00417.41
8.1.100.0070.00017.40
8.1.90.0000.00717.34
8.1.80.0050.00317.42
8.1.70.0030.00317.26
8.1.60.0090.00017.50
8.1.50.0060.00317.51
8.1.40.0000.00817.48
8.1.30.0040.00417.57
8.1.20.0070.00017.61
8.1.10.0000.00817.46
8.1.00.0040.00417.36
8.0.300.0000.00719.55
8.0.290.0040.00416.63
8.0.280.0030.00318.29
8.0.270.0030.00317.16
8.0.260.0000.00617.15
8.0.250.0000.00716.85
8.0.240.0030.00316.96
8.0.230.0000.00716.85
8.0.220.0030.00316.94
8.0.210.0080.00016.85
8.0.200.0070.00016.95
8.0.190.0030.00316.93
8.0.180.0000.00716.91
8.0.170.0040.00416.93
8.0.160.0050.00316.89
8.0.150.0070.00016.81
8.0.140.0040.00316.88
8.0.130.0030.00713.25
8.0.120.0000.00816.86
8.0.110.0050.00316.96
8.0.100.0070.00016.86
8.0.90.0040.00416.96
8.0.80.0070.01016.81
8.0.70.0040.00416.76
8.0.60.0040.00416.80
8.0.50.0070.00016.95
8.0.30.0070.01117.07
8.0.20.0090.01117.41
8.0.10.0060.00316.96
8.0.00.0100.00716.81
7.4.330.0020.00215.00
7.4.320.0030.00316.53
7.4.300.0000.00716.61
7.4.290.0080.00016.40
7.4.280.0000.00716.64
7.4.270.0030.00416.63
7.4.260.0000.00716.54
7.4.250.0080.00016.46
7.4.240.0020.00616.59
7.4.230.0030.00316.55
7.4.220.0070.01116.40
7.4.210.0080.01016.56
7.4.200.0070.00016.70
7.4.190.0070.00016.47
7.4.160.0150.00616.57
7.4.150.0080.00817.40
7.4.140.0110.00617.86
7.4.130.0070.01216.48
7.4.120.0080.01216.49
7.4.110.0070.01016.51
7.4.100.0100.00716.29
7.4.90.0120.00616.54
7.4.80.0120.00619.39
7.4.70.0100.00716.48
7.4.60.0090.01316.59
7.4.50.0030.00616.28
7.4.40.0060.00922.77
7.4.30.0100.00716.35
7.4.00.0070.00714.97
7.3.330.0030.00313.02
7.3.320.0030.00313.01
7.3.310.0070.00016.20
7.3.300.0040.00416.25
7.3.290.0140.00416.38
7.3.280.0090.00816.29
7.3.270.0090.00917.40
7.3.260.0160.00316.40
7.3.250.0050.01116.56
7.3.240.0030.01316.31
7.3.230.0060.00916.39
7.3.210.0000.01616.27
7.3.200.0110.00819.39
7.3.190.0080.01416.39
7.3.180.0070.01316.55
7.3.170.0080.00816.37
7.3.160.0070.01016.19
7.3.120.0110.00414.71
7.2.330.0090.00916.62
7.2.320.0110.00716.46
7.2.310.0180.00416.58
7.2.300.0090.00916.33
7.2.290.0030.01416.52
7.2.60.0060.00616.48
7.1.200.0030.01015.70
7.1.70.0000.00717.07
7.1.60.0190.00319.46
7.1.50.0030.01716.88
7.1.00.0070.07322.24
7.0.200.0000.00716.88
7.0.140.0000.08021.92
7.0.60.0170.08320.02
7.0.50.0070.04017.80
7.0.40.0030.04320.21
7.0.30.0600.07020.01
7.0.20.0270.07720.20
7.0.10.0100.08320.22
7.0.00.0100.08319.99
5.6.280.0000.07721.07
5.6.210.0070.08020.69
5.6.200.0030.04018.22
5.6.190.0130.06720.67
5.6.180.0230.03720.58
5.6.170.0330.07020.42
5.6.160.0100.08020.41
5.6.150.0070.04718.07
5.6.140.0200.06318.18
5.6.130.0070.04018.17
5.6.120.0070.08021.09
5.6.110.0030.08021.09
5.6.100.0100.08320.88
5.6.90.0070.05720.99
5.6.80.0100.05020.38
5.6.70.4000.03720.27
5.5.350.0130.08020.30
5.5.340.0130.07318.01
5.5.330.0170.07020.06
5.5.320.0000.06720.51
5.5.310.0370.07320.18
5.5.300.0000.04317.89
5.5.290.0070.03717.95
5.5.280.0070.06020.80
5.5.270.0000.07720.75
5.5.260.0070.04720.79
5.5.250.0070.07720.75
5.5.240.0230.07720.23
5.4.450.1130.06319.49
5.4.440.0200.06019.47
5.4.430.0330.06719.41
5.4.420.0270.07019.54
5.4.410.0370.07019.42
5.4.400.0330.04719.20
5.4.390.0330.04319.28
5.4.380.0330.06018.53
5.4.370.0200.05718.76
5.4.360.0330.04018.67
5.4.350.0270.05718.61
5.4.340.0200.05318.46
5.4.320.0060.04012.46
5.4.310.0060.03812.45
5.4.300.0070.03512.46
5.4.290.0070.03712.45
5.4.280.0060.03712.32
5.4.270.0090.03712.32
5.4.260.0070.04012.32
5.4.250.0110.04812.32
5.4.240.0090.04412.32
5.4.230.0070.04212.32
5.4.220.0070.04712.31
5.4.210.0070.04012.31
5.4.200.0080.03812.32
5.4.190.0070.03712.31
5.4.180.0040.03712.31
5.4.170.0080.04512.32
5.4.160.0100.03512.32
5.4.150.0080.03612.32
5.4.140.0060.04012.00
5.4.130.0080.04011.99
5.4.120.0070.05811.95
5.4.110.0170.04811.94
5.4.100.0120.04511.94
5.4.90.0110.04911.94
5.4.80.0050.06111.94
5.4.70.0090.05111.94
5.4.60.0110.04911.94
5.4.50.0070.05611.94
5.4.40.0110.03811.92
5.4.30.0130.05911.92
5.4.20.0170.04911.92
5.4.10.0090.05011.93
5.4.00.0090.04611.41
5.3.290.0070.03712.80
5.3.280.0080.05812.71
5.3.270.0090.06812.72
5.3.260.0140.05412.72
5.3.250.0140.04412.72
5.3.240.0140.06912.72
5.3.230.0140.04912.71
5.3.220.0080.05512.68
5.3.210.0140.06012.68
5.3.200.0130.04412.68
5.3.190.0070.04612.68
5.3.180.0070.04312.68
5.3.170.0080.04012.67
5.3.160.0070.04412.67
5.3.150.0120.04112.67
5.3.140.0110.04912.66
5.3.130.0190.06012.65
5.3.120.0150.08912.66
5.3.110.0050.04312.66
5.3.100.0070.04312.12
5.3.90.0090.03512.09
5.3.80.0050.03912.07
5.3.70.0070.03712.07
5.3.60.0100.03512.06
5.3.50.0080.04612.00
5.3.40.0100.03612.00
5.3.30.0060.03811.94
5.3.20.0110.03311.70
5.3.10.0070.03811.67
5.3.00.0110.04311.66
5.2.170.0070.0399.15
5.2.160.0070.0429.15
5.2.150.0070.0319.15
5.2.140.0070.0319.14
5.2.130.0060.0319.11
5.2.120.0080.0289.11
5.2.110.0080.0289.12
5.2.100.0050.0309.11
5.2.90.0040.0319.11
5.2.80.0050.0369.11
5.2.70.0050.0319.11
5.2.60.0090.0359.06
5.2.50.0080.0309.04
5.2.40.0080.0289.00
5.2.30.0070.0338.99
5.2.20.0030.0328.97
5.2.10.0050.0298.90
5.2.00.0060.0298.76
5.1.60.0050.0248.05
5.1.50.0050.0258.05
5.1.40.0030.0268.03
5.1.30.0040.0278.38
5.1.20.0060.0268.40
5.1.10.0050.0278.13
5.1.00.0020.0298.13
5.0.50.0030.0226.60
5.0.40.0030.0206.46
5.0.30.0040.0316.27
5.0.20.0030.0206.25
5.0.10.0020.0226.23
5.0.00.0020.0356.22
4.4.90.0060.0214.78
4.4.80.0030.0214.76
4.4.70.0030.0214.75
4.4.60.0020.0224.75
4.4.50.0040.0154.77
4.4.40.0060.0304.70
4.4.30.0050.0194.76
4.4.20.0020.0234.84
4.4.10.0040.0244.85
4.4.00.0040.0314.76
4.3.110.0030.0214.67
4.3.100.0050.0234.66
4.3.90.0040.0244.64
4.3.80.0060.0324.58
4.3.70.0030.0284.63
4.3.60.0060.0224.63
4.3.50.0060.0234.63
4.3.40.0030.0384.53
4.3.30.0020.0243.28
4.3.20.0020.0223.26
4.3.10.0030.0213.22
4.3.00.0000.02310.30

preferences:
45.51 ms | 401 KiB | 5 Q