3v4l.org

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

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.0070.00716.38
8.3.50.0170.00621.98
8.3.40.0040.01118.55
8.3.30.0210.00019.06
8.3.20.0070.00020.29
8.3.10.0050.00323.70
8.3.00.0030.00619.26
8.2.180.0070.01416.38
8.2.170.0110.00322.96
8.2.160.0140.00020.52
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0030.00619.20
8.2.110.0090.00020.32
8.2.100.0080.00317.91
8.2.90.0030.00619.05
8.2.80.0090.00017.97
8.2.70.0050.00317.50
8.2.60.0040.00417.93
8.2.50.0030.00618.07
8.2.40.0040.00418.16
8.2.30.0000.00818.04
8.2.20.0070.00017.79
8.2.10.0000.01018.18
8.2.00.0040.00717.79
8.1.280.0110.00725.92
8.1.270.0050.00322.19
8.1.260.0040.00426.35
8.1.250.0000.00728.09
8.1.240.0030.00623.92
8.1.230.0110.00017.52
8.1.220.0040.00417.79
8.1.210.0080.00418.77
8.1.200.0060.00317.36
8.1.190.0030.00517.52
8.1.180.0040.00419.01
8.1.170.0000.00918.57
8.1.160.0040.00422.00
8.1.150.0040.00418.70
8.1.140.0000.00817.45
8.1.130.0000.00717.70
8.1.120.0030.00617.44
8.1.110.0050.00317.44
8.1.100.0040.00417.39
8.1.90.0070.00017.37
8.1.80.0050.00217.37
8.1.70.0000.00817.34
8.1.60.0000.00917.56
8.1.50.0090.00017.56
8.1.40.0030.00617.54
8.1.30.0000.00917.48
8.1.20.0070.00017.55
8.1.10.0040.00417.31
8.1.00.0030.00617.34
8.0.300.0000.00718.77
8.0.290.0060.00316.88
8.0.280.0030.00518.35
8.0.270.0000.00717.25
8.0.260.0030.00317.25
8.0.250.0000.00716.94
8.0.240.0000.00716.99
8.0.230.0000.00716.91
8.0.220.0070.00016.85
8.0.210.0000.00816.81
8.0.200.0000.00617.00
8.0.190.0070.00016.98
8.0.180.0070.00016.93
8.0.170.0030.00516.80
8.0.160.0040.00416.87
8.0.150.0000.00816.79
8.0.140.0020.00516.75
8.0.130.0070.00013.36
8.0.120.0000.00816.84
8.0.110.0060.00316.86
8.0.100.0040.00416.75
8.0.90.0000.00716.91
8.0.80.0000.01716.84
8.0.70.0040.00416.72
8.0.60.0040.00416.84
8.0.50.0000.00716.85
8.0.30.0130.00517.06
8.0.20.0060.01417.40
8.0.10.0000.00716.84
8.0.00.0080.00816.70
7.4.330.0000.00615.00
7.4.320.0000.00716.64
7.4.300.0030.00316.60
7.4.290.0000.00716.58
7.4.280.0030.00416.48
7.4.270.0040.00416.50
7.4.260.0030.00316.38
7.4.250.0030.00516.45
7.4.240.0030.00316.55
7.4.230.0000.00716.59
7.4.220.0040.01216.53
7.4.210.0100.00516.59
7.4.200.0030.00316.66
7.4.190.0040.00416.38
7.4.160.0080.00816.46
7.4.150.0140.00317.40
7.4.140.0110.00717.86
7.4.130.0090.01116.46
7.4.120.0080.00816.35
7.4.110.0120.00616.29
7.4.100.0080.00816.29
7.4.90.0060.01016.49
7.4.80.0090.01419.39
7.4.70.0140.00716.47
7.4.60.0090.00916.35
7.4.50.0080.00016.30
7.4.40.0030.01022.77
7.4.30.0090.00616.22
7.4.00.0070.00715.10
7.3.330.0060.00013.14
7.3.320.0000.00613.05
7.3.310.0040.00416.12
7.3.300.0040.00416.25
7.3.290.0130.00716.33
7.3.280.0110.00516.30
7.3.270.0100.00717.40
7.3.260.0140.00716.43
7.3.250.0100.00916.46
7.3.240.0070.01016.62
7.3.230.0110.00616.44
7.3.210.0120.00616.23
7.3.200.0070.01019.39
7.3.190.0110.00716.49
7.3.180.0120.00316.36
7.3.170.0070.00716.50
7.3.160.0060.01016.30
7.3.120.0000.01614.72
7.3.10.0100.00016.63
7.3.00.0030.00916.66
7.2.330.0060.01116.51
7.2.320.0060.01616.73
7.2.310.0100.00616.50
7.2.300.0100.01316.87
7.2.290.0060.01016.81
7.2.130.0040.00716.90
7.2.120.0080.00416.86
7.2.110.0060.00616.92
7.2.100.0080.00016.96
7.2.90.0030.00616.87
7.2.80.0060.00616.86
7.2.70.0040.01116.63
7.2.60.0040.01116.71
7.2.50.0040.00816.87
7.2.40.0060.00616.88
7.2.30.0030.00816.68
7.2.20.0130.00317.02
7.2.10.0000.01316.82
7.2.00.0050.00818.21
7.1.250.0030.00915.79
7.1.100.0040.00718.15
7.1.70.0030.00517.07
7.1.60.0060.01219.46
7.1.50.0070.00716.68
7.1.00.0100.07022.48
7.0.200.0040.00416.88
7.0.140.0000.07722.13
7.0.60.0070.06719.92
7.0.50.0070.06017.82
7.0.40.0070.04320.22
7.0.30.0370.04020.13
7.0.20.0230.07020.30
7.0.10.0070.08720.20
7.0.00.0130.07720.18
5.6.280.0030.07320.78
5.6.210.0030.08720.51
5.6.200.0000.04718.19
5.6.190.0100.08320.39
5.6.180.0300.05320.45
5.6.170.0170.06020.41
5.6.160.0200.07020.39
5.6.150.0070.04018.21
5.6.140.0070.03718.22
5.6.130.0070.07318.11
5.6.120.0100.08721.08
5.6.110.0100.08321.13
5.6.100.0070.08721.08
5.6.90.0030.08021.08
5.6.80.0000.08720.43
5.6.70.4300.03320.39
5.5.350.0200.07020.40
5.5.340.0000.04318.02
5.5.330.0100.07320.20
5.5.320.0100.08720.20
5.5.310.0330.07720.30
5.5.300.0000.05318.02
5.5.290.0000.06718.00
5.5.280.0130.03720.95
5.5.270.0030.04320.97
5.5.260.0100.06720.86
5.5.250.0070.05020.63
5.5.240.0130.04320.16
5.4.450.0630.06719.41
5.4.440.0330.05019.52
5.4.430.0170.05719.46
5.4.420.0170.05719.51
5.4.410.0370.05019.19
5.4.400.0200.05018.92
5.4.390.0200.06019.27
5.4.380.0330.05318.67
5.4.370.0530.06718.68
5.4.360.0300.05318.65
5.4.350.0200.05318.48
5.4.340.0500.06018.53
5.4.320.0040.03812.46
5.4.310.0050.03912.45
5.4.300.0040.03712.46
5.4.290.0060.03812.45
5.4.280.0210.06512.32
5.4.270.0120.07112.32
5.4.260.0170.06412.32
5.4.250.0120.07812.32
5.4.240.0140.05412.32
5.4.230.0090.05912.31
5.4.220.0180.06612.32
5.4.210.0140.06312.32
5.4.200.0220.08512.32
5.4.190.0270.10312.31
5.4.180.0160.08312.31
5.4.170.0240.07212.32
5.4.160.0220.07912.32
5.4.150.0310.07412.31
5.4.140.0100.04412.00
5.4.130.0080.04111.99
5.4.120.0090.03711.94
5.4.110.0090.05611.94
5.4.100.0130.04211.94
5.4.90.0130.04711.94
5.4.80.0080.04711.94
5.4.70.0080.05111.94
5.4.60.0070.05011.93
5.4.50.0160.07511.94
5.4.40.0080.05411.93
5.4.30.0140.05911.93
5.4.20.0090.04911.92
5.4.10.0150.07411.92
5.4.00.0150.07211.41
5.3.290.0050.04512.80
5.3.280.0070.06412.71
5.3.270.0090.05612.73
5.3.260.0110.06812.72
5.3.250.0120.06212.72
5.3.240.0110.05512.72
5.3.230.0270.06812.71
5.3.220.0180.09812.68
5.3.210.0110.04812.68
5.3.200.0050.04412.68
5.3.190.0110.04012.68
5.3.180.0070.04612.67
5.3.170.0290.09212.67
5.3.160.0100.05612.67
5.3.150.0130.04012.67
5.3.140.0080.05012.66
5.3.130.0180.06812.66
5.3.120.0250.07512.66
5.3.110.0140.04412.65
5.3.100.0100.03812.12
5.3.90.0090.03812.09
5.3.80.0100.03912.08
5.3.70.0060.05512.07
5.3.60.0100.05112.07
5.3.50.0140.04212.00
5.3.40.0080.03912.00
5.3.30.0140.03211.94
5.3.20.0120.03611.70
5.3.10.0080.04011.66
5.3.00.0070.04111.66
5.2.170.0090.0319.15
5.2.160.0060.0319.15
5.2.150.0060.0339.15
5.2.140.0050.0369.15
5.2.130.0110.0389.11
5.2.120.0060.0429.11
5.2.110.0080.0369.12
5.2.100.0110.0349.11
5.2.90.0070.0419.11
5.2.80.0070.0419.11
5.2.70.0090.0399.11
5.2.60.0040.0349.06
5.2.50.0050.0339.04
5.2.40.0040.0359.00
5.2.30.0080.0448.98
5.2.20.0060.0308.97
5.2.10.0090.0348.90
5.2.00.0060.0398.76
5.1.60.0050.0278.05
5.1.50.0100.0298.05
5.1.40.0060.0348.03
5.1.30.0040.0378.38
5.1.20.0070.0378.40
5.1.10.0140.0418.13
5.1.00.0210.0588.13
5.0.50.0140.0386.60
5.0.40.0250.0426.46
5.0.30.0150.0526.27
5.0.20.0110.0326.25
5.0.10.0390.0526.23
5.0.00.0070.0396.21
4.4.90.0040.0224.78
4.4.80.0050.0214.75
4.4.70.0040.0224.75
4.4.60.0040.0224.75
4.4.50.0080.0194.77
4.4.40.0130.0434.71
4.4.30.0050.0204.76
4.4.20.0150.0434.84
4.4.10.0090.0404.85
4.4.00.0040.0274.76
4.3.110.0260.0504.67
4.3.100.0110.0254.66
4.3.90.0050.0244.64
4.3.80.0030.0364.59
4.3.70.0090.0404.63
4.3.60.0040.0234.62
4.3.50.0070.0344.63
4.3.40.0030.0314.54
4.3.30.0030.0203.28
4.3.20.0100.0243.26
4.3.10.0080.0313.22
4.3.00.0330.02010.30

preferences:
44.49 ms | 400 KiB | 5 Q