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); } }

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.00718.18
8.3.50.0080.00821.89
8.3.40.0110.00418.41
8.3.30.0110.00319.14
8.3.20.0040.00420.34
8.3.10.0060.00323.48
8.3.00.0030.00619.25
8.2.180.0110.00718.18
8.2.170.0070.01122.96
8.2.160.0000.01420.52
8.2.150.0040.00424.18
8.2.140.0030.00624.66
8.2.130.0080.00026.16
8.2.120.0080.00022.20
8.2.110.0050.00519.23
8.2.100.0080.00417.66
8.2.90.0060.00319.05
8.2.80.0060.00317.97
8.2.70.0040.00417.63
8.2.60.0060.00317.80
8.2.50.0080.00018.07
8.2.40.0000.00718.16
8.2.30.0030.00517.98
8.2.20.0040.00417.77
8.2.10.0030.00618.12
8.2.00.0000.01017.75
8.1.280.0140.00325.92
8.1.270.0040.00422.14
8.1.260.0090.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00322.11
8.1.230.0050.00518.87
8.1.220.0110.00217.74
8.1.210.0000.00818.77
8.1.200.0030.00617.22
8.1.190.0000.00817.23
8.1.180.0080.00018.10
8.1.170.0040.00418.64
8.1.160.0070.00021.92
8.1.150.0030.00618.67
8.1.140.0040.00417.36
8.1.130.0000.00717.87
8.1.120.0030.00717.40
8.1.110.0000.00817.33
8.1.100.0040.00317.49
8.1.90.0000.00717.44
8.1.80.0070.00017.34
8.1.70.0000.00617.43
8.1.60.0080.00017.65
8.1.50.0030.00517.44
8.1.40.0080.00017.58
8.1.30.0040.00417.57
8.1.20.0040.00417.64
8.1.10.0000.00717.46
8.1.00.0070.00017.27
8.0.300.0000.00720.21
8.0.290.0060.00316.75
8.0.280.0000.00718.44
8.0.270.0070.00017.17
8.0.260.0030.00317.25
8.0.250.0000.00716.96
8.0.240.0030.00317.01
8.0.230.0000.00716.97
8.0.220.0030.00316.79
8.0.210.0000.00716.89
8.0.200.0000.00716.88
8.0.190.0070.00016.98
8.0.180.0050.00316.86
8.0.170.0030.00516.79
8.0.160.0040.00416.83
8.0.150.0030.00316.94
8.0.140.0070.00016.91
8.0.130.0030.00513.38
8.0.120.0050.00316.77
8.0.110.0040.00416.90
8.0.100.0050.00216.95
8.0.90.0000.00816.68
8.0.80.0040.01116.86
8.0.70.0030.00516.79
8.0.60.0070.00016.91
8.0.50.0040.00416.89
8.0.30.0140.00616.84
8.0.20.0090.01017.40
8.0.10.0030.00516.88
8.0.00.0120.00616.65
7.4.330.0070.00015.00
7.4.320.0030.00316.46
7.4.300.0000.00616.60
7.4.290.0070.00016.61
7.4.280.0060.00316.51
7.4.270.0030.00416.42
7.4.260.0040.00416.55
7.4.250.0030.00516.48
7.4.240.0030.00316.54
7.4.230.0040.00416.41
7.4.220.0130.00316.56
7.4.210.0060.00916.60
7.4.200.0000.00716.35
7.4.190.0000.00716.46
7.4.160.0130.00316.54
7.4.150.0140.00317.40
7.4.140.0100.00817.86
7.4.130.0070.01116.52
7.4.120.0060.01116.43
7.4.110.0030.01616.43
7.4.100.0100.00716.46
7.4.90.0060.01216.34
7.4.80.0150.00719.39
7.4.70.0100.02016.49
7.4.60.0130.00616.43
7.4.50.0040.00416.42
7.4.40.0060.01122.77
7.4.30.0090.00616.40
7.4.00.0030.01014.93
7.3.330.0040.00213.29
7.3.320.0030.00312.98
7.3.310.0040.00416.44
7.3.300.0000.00716.26
7.3.290.0040.01516.27
7.3.280.0090.00816.21
7.3.270.0100.00717.40
7.3.260.0080.01616.62
7.3.250.0110.00616.31
7.3.240.0140.00316.33
7.3.230.0060.01216.39
7.3.210.0140.00416.42
7.3.200.0000.01819.39
7.3.190.0130.00716.46
7.3.180.0100.01016.37
7.3.170.0100.00616.55
7.3.160.0060.01016.32
7.3.120.0120.00014.75
7.2.330.0030.01616.73
7.2.320.0130.01016.79
7.2.310.0120.00916.47
7.2.300.0070.01016.40
7.2.290.0140.00416.51
7.2.00.0040.01119.61
7.1.200.0060.00615.61
7.1.100.0070.00718.06
7.1.70.0000.01017.13
7.1.60.0060.01819.46
7.1.50.0070.00316.71
7.1.00.0000.08022.31
7.0.200.0000.00916.87
7.0.140.0070.07322.13
7.0.60.0070.08720.02
7.0.50.0030.04017.90
7.0.40.0100.04320.42
7.0.30.0200.04020.03
7.0.20.0330.08019.98
7.0.10.0070.08720.24
7.0.00.0030.04020.00
5.6.280.0100.06721.04
5.6.210.0170.04320.56
5.6.200.0100.08718.12
5.6.190.0070.04020.56
5.6.180.4030.05020.77
5.6.170.0270.07320.50
5.6.160.0070.08320.38
5.6.150.0030.07018.18
5.6.140.0030.04318.17
5.6.130.0130.04318.10
5.6.120.0070.04721.09
5.6.110.0100.08720.98
5.6.100.0100.04321.00
5.6.90.0070.05020.95
5.6.80.0000.05720.48
5.5.350.0200.07720.32
5.5.340.0130.07317.92
5.5.330.0070.05320.57
5.5.320.0200.04320.52
5.5.310.0130.06020.21
5.5.300.0100.03317.98
5.5.290.0100.08317.90
5.5.280.0130.08020.87
5.5.270.0100.08020.77
5.5.260.0000.09020.73
5.5.250.0030.04020.68
5.5.240.0100.04720.15
5.4.450.1330.03719.21
5.4.440.0300.03719.25
5.4.430.0130.03719.40
5.4.420.0770.03719.50
5.4.410.0900.04319.00
5.4.400.0370.04019.27
5.4.390.1000.03318.89
5.4.380.0430.04718.65
5.4.370.0400.05718.62
5.4.360.0400.05718.67
5.4.350.0370.05318.65
5.4.340.0600.04018.63
5.4.320.0050.03712.45
5.4.310.0040.04012.45
5.4.300.0070.04012.46
5.4.290.0050.03812.45
5.4.280.0110.06812.32
5.4.270.0260.08812.32
5.4.260.0070.06312.32
5.4.250.0080.07612.32
5.4.240.0070.05612.32
5.4.230.0150.05612.31
5.4.220.0170.06712.32
5.4.210.0130.06212.32
5.4.200.0060.03912.32
5.4.190.0070.03612.31
5.4.180.0100.08212.31
5.4.170.0090.03712.32
5.4.160.0100.05012.32
5.4.150.0170.04512.31
5.4.140.0150.05512.00
5.4.130.0130.04511.98
5.4.120.0120.06511.94
5.4.110.0140.05611.94
5.4.100.0060.03911.94
5.4.90.0080.03811.95
5.4.80.0090.03711.94
5.4.70.0060.03811.93
5.4.60.0050.04011.94
5.4.50.0070.03811.93
5.4.40.0100.03511.93
5.4.30.0070.04511.92
5.4.20.0090.04511.92
5.4.10.0070.03711.93
5.4.00.0050.03811.41
5.3.290.0060.04312.80
5.3.280.0110.04012.71
5.3.270.0090.06412.73
5.3.260.0240.08012.72
5.3.250.0100.05712.72
5.3.240.0150.06712.72
5.3.230.0090.04712.70
5.3.220.0120.06312.68
5.3.210.0070.05712.68
5.3.200.0130.05312.68
5.3.190.0100.05512.68
5.3.180.0260.04812.67
5.3.170.0120.05312.67
5.3.160.0090.03912.67
5.3.150.0090.04312.67
5.3.140.0100.04412.66
5.3.130.0120.04112.66
5.3.120.0100.04112.66
5.3.110.0090.04312.66
5.3.100.0090.04312.12
5.3.90.0100.04412.08
5.3.80.0070.04012.08
5.3.70.0090.03712.08
5.3.60.0130.06712.06
5.3.50.0120.04312.00
5.3.40.0120.07212.00
5.3.30.0110.06411.93
5.3.20.0120.04511.70
5.3.10.0070.04311.66
5.3.00.0070.04911.66
5.2.170.0060.0359.14
5.2.160.0060.0329.15
5.2.150.0100.0319.15
5.2.140.0000.0399.14
5.2.130.0070.0319.11
5.2.120.0060.0349.11
5.2.110.0060.0329.11
5.2.100.0110.0419.12
5.2.90.0050.0349.11
5.2.80.0050.0339.11
5.2.70.0070.0359.10
5.2.60.0140.0479.06
5.2.50.0070.0439.03
5.2.40.0090.0499.00
5.2.30.0140.0498.99
5.2.20.0120.0588.97
5.2.10.0100.0378.90
5.2.00.0130.0388.76
5.1.60.0170.0778.05
5.1.50.0110.0418.05
5.1.40.0240.0478.03
5.1.30.0040.0488.38
5.1.20.0160.0558.40
5.1.10.0130.0358.13
5.1.00.0120.0388.13
5.0.50.0060.0386.60
5.0.40.0060.0336.46
5.0.30.0070.0526.27
5.0.20.0130.0336.25
5.0.10.0080.0426.22
5.0.00.0230.0846.21
4.4.90.0080.0434.78
4.4.80.0110.0354.75
4.4.70.0080.0624.76
4.4.60.0080.0424.75
4.4.50.0130.0444.77
4.4.40.0040.0694.71
4.4.30.0170.0394.76
4.4.20.0040.0304.85
4.4.10.0050.0274.85
4.4.00.0070.0574.76
4.3.110.0060.0414.67
4.3.100.0070.0364.66
4.3.90.0030.0504.63
4.3.80.0070.0424.59
4.3.70.0120.0474.63
4.3.60.0070.0294.63
4.3.50.0080.0464.63
4.3.40.0170.0804.54
4.3.30.0120.0643.28
4.3.20.0040.0243.26
4.3.10.0040.0193.22
4.3.00.0270.01713.47

preferences:
48.59 ms | 401 KiB | 5 Q