3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = array('one','two'); $b=array('three','four','five'); //not a union of arrays' values echo '$a + $b : '; print_r ($a + $b); //a union of arrays' values echo "array_unique(array_merge($a,$b)):"; // cribbed from http://oreilly.com/catalog/progphp/chapter/ch05.html print_r (array_unique(array_merge($a,$b)));

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.0090.00918.27
8.3.50.0110.01021.07
8.3.40.0130.00318.67
8.3.30.0090.00619.04
8.3.20.0000.00720.16
8.3.10.0070.00023.61
8.3.00.0000.00919.38
8.2.180.0030.01216.38
8.2.170.0040.01122.96
8.2.160.0130.00020.35
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00422.23
8.2.110.0040.00420.32
8.2.100.0000.01318.16
8.2.90.0050.00319.22
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0030.00618.16
8.2.50.0030.00618.07
8.2.40.0040.00419.93
8.2.30.0070.00017.97
8.2.20.0000.00717.75
8.2.10.0030.00517.94
8.2.00.0000.00717.67
8.1.280.0110.00725.92
8.1.270.0090.00023.97
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0030.00623.87
8.1.230.0040.00819.18
8.1.220.0000.00817.74
8.1.210.0030.00618.77
8.1.200.0030.00617.10
8.1.190.0000.00917.23
8.1.180.0050.00318.10
8.1.170.0040.00718.66
8.1.160.0000.00722.01
8.1.150.0040.00418.82
8.1.140.0000.00717.30
8.1.130.0060.00317.38
8.1.120.0040.00317.27
8.1.110.0070.00017.39
8.1.100.0040.00417.27
8.1.90.0040.00317.41
8.1.80.0040.00417.30
8.1.70.0000.00717.35
8.1.60.0040.00417.53
8.1.50.0030.00517.48
8.1.40.0000.00717.44
8.1.30.0040.00417.55
8.1.20.0040.00417.49
8.1.10.0030.00617.39
8.1.00.0040.00417.51
8.0.300.0080.00018.77
8.0.290.0040.00416.75
8.0.280.0000.00718.35
8.0.270.0030.00317.25
8.0.260.0030.00316.88
8.0.250.0070.00017.07
8.0.240.0030.00316.89
8.0.230.0070.00016.98
8.0.220.0000.00716.95
8.0.210.0030.00317.00
8.0.200.0070.00017.05
8.0.190.0040.00417.06
8.0.180.0000.00717.02
8.0.170.0030.00616.97
8.0.160.0000.00716.87
8.0.150.0040.00416.86
8.0.140.0000.00716.82
8.0.130.0000.00713.49
8.0.120.0000.00816.89
8.0.110.0000.00716.97
8.0.100.0070.00017.07
8.0.90.0000.00816.83
8.0.80.0100.00616.93
8.0.70.0050.00316.79
8.0.60.0030.00516.84
8.0.50.0000.00716.84
8.0.30.0090.01117.20
8.0.20.0130.01017.40
8.0.10.0050.00516.89
8.0.00.0120.00916.69
7.4.330.0000.00515.00
7.4.320.0030.00316.44
7.4.300.0000.00616.51
7.4.290.0000.00716.39
7.4.280.0030.00616.53
7.4.270.0030.00316.55
7.4.260.0040.00416.52
7.4.250.0020.00516.48
7.4.240.0050.00216.51
7.4.230.0030.00316.64
7.4.220.0070.01116.62
7.4.210.0110.00316.56
7.4.200.0030.00316.52
7.4.160.0110.00816.38
7.4.150.0120.01217.40
7.4.140.0100.01017.86
7.4.130.0080.00816.36
7.4.120.0070.01016.47
7.4.110.0120.00616.27
7.4.100.0090.00916.60
7.4.90.0070.01016.27
7.4.80.0100.00619.39
7.4.70.0030.01416.57
7.4.60.0070.01016.45
7.4.50.0040.00416.47
7.4.40.0060.01516.44
7.4.30.0120.00916.39
7.4.00.0060.01114.72
7.3.330.0050.00013.20
7.3.320.0000.00613.21
7.3.310.0070.00016.14
7.3.300.0000.00816.35
7.3.290.0100.01016.36
7.3.280.0110.00816.26
7.3.270.0090.00917.40
7.3.260.0030.02016.23
7.3.240.0110.00616.31
7.3.230.0100.00616.57
7.3.210.0070.01016.34
7.3.200.0140.00419.39
7.3.190.0070.01116.38
7.3.180.0120.00316.37
7.3.170.0120.00316.39
7.3.160.0040.01216.57
7.2.330.0090.00916.59
7.2.320.0060.01216.54
7.2.310.0080.00916.52
7.2.300.0030.01616.23
7.2.290.0150.00316.45
7.2.00.0120.00319.00
7.1.100.0000.01118.19
7.1.70.0030.00617.26
7.1.60.0120.00619.32
7.1.50.0100.01316.77
7.1.00.0070.06722.30
7.0.200.0000.00816.84
7.0.140.0030.07322.09
7.0.60.0070.08019.90
7.0.50.0030.08317.95
7.0.40.0170.08019.97
7.0.30.0300.07720.23
7.0.20.0330.07020.08
7.0.10.0030.04720.13
7.0.00.0000.04320.23
5.6.280.0030.07320.90
5.6.210.0030.04020.54
5.6.200.0070.04018.23
5.6.190.0100.08020.60
5.6.180.0330.06020.64
5.6.170.0200.05720.52
5.6.160.0100.08020.54
5.6.150.0070.07718.27
5.6.140.0100.06318.21
5.6.130.0030.04318.14
5.6.120.0130.08320.93
5.6.110.0100.07721.08
5.6.100.0100.07320.97
5.6.90.0070.08021.07
5.6.80.0030.07320.36
5.5.350.0130.08020.40
5.5.340.0030.03717.98
5.5.330.0030.08320.46
5.5.320.0470.06720.50
5.5.310.0170.08020.32
5.5.300.0100.08018.03
5.5.290.0170.07317.96
5.5.280.0100.07720.88
5.5.270.0070.07020.60
5.5.260.0030.04020.96
5.5.250.0100.08020.71
5.5.240.0200.02720.14
5.4.450.0200.05719.70
5.4.440.0300.05019.34
5.4.430.0230.05319.38
5.4.420.0630.00019.55
5.4.410.0670.00019.21
5.4.400.0630.00019.26
5.4.390.0630.00019.07
5.4.380.0630.00019.04
5.4.370.0630.00019.01
5.4.360.0630.00019.11
5.4.350.0630.00019.13
5.4.340.0060.03412.00
5.4.320.0020.04112.48
5.4.310.0110.03312.48
5.4.300.0060.03912.48
5.4.290.0080.05912.48
5.4.280.0070.03712.38
5.4.270.0050.04112.38
5.4.260.0130.04612.38
5.4.250.0070.05112.38
5.4.240.0060.04012.38
5.4.230.0080.03612.37
5.4.220.0090.03812.37
5.4.210.0050.03812.37
5.4.200.0070.03612.37
5.4.190.0080.03312.37
5.4.180.0070.03412.36
5.4.170.0070.03512.38
5.4.160.0070.03512.37
5.4.150.0060.03812.37
5.4.140.0050.03712.05
5.4.130.0050.03612.04
5.4.120.0070.03412.00
5.4.110.0070.03411.99
5.4.100.0070.03411.99
5.4.90.0090.03512.00
5.4.80.0070.03711.99
5.4.70.0050.03511.99
5.4.60.0050.03511.99
5.4.50.0040.03811.99
5.4.40.0060.03711.98
5.4.30.0060.03611.97
5.4.20.0060.03611.98
5.4.10.0050.03611.97
5.4.00.0040.03811.47
5.3.290.0060.04312.80
5.3.280.0120.03412.71
5.3.270.0110.05112.72
5.3.260.0110.05412.72
5.3.250.0100.04812.72
5.3.240.0120.04812.72
5.3.230.0120.05412.71
5.3.220.0120.03912.68
5.3.210.0080.05512.68
5.3.200.0110.03412.68
5.3.190.0080.03812.68
5.3.180.0060.03712.68
5.3.170.0060.03712.67
5.3.160.0100.04512.67
5.3.150.0090.04612.68
5.3.140.0160.04412.66
5.3.130.0110.05312.66
5.3.120.0140.04312.66
5.3.110.0050.04312.66
5.3.100.0070.03812.12
5.3.90.0100.03512.09
5.3.80.0090.03612.08
5.3.70.0070.03812.08
5.3.60.0080.04012.07
5.3.50.0110.04512.01
5.3.40.0050.03812.01
5.3.30.0070.03511.97
5.3.20.0040.03711.75
5.3.10.0080.03311.72
5.3.00.0040.04111.71
5.2.170.0050.0319.21
5.2.160.0020.0329.21
5.2.150.0030.0329.20
5.2.140.0040.0329.20
5.2.130.0040.0319.16
5.2.120.0050.0289.16
5.2.110.0060.0289.17
5.2.100.0040.0299.16
5.2.90.0100.0279.16
5.2.80.0040.0329.16
5.2.70.0060.0319.16
5.2.60.0090.0309.11
5.2.50.0100.0279.08
5.2.40.0030.0309.06
5.2.30.0040.0339.04
5.2.20.0040.0309.02
5.2.10.0060.0268.93
5.2.00.0060.0278.80
5.1.60.0050.0238.06
5.1.50.0010.0288.06
5.1.40.0050.0238.04
5.1.30.0040.0268.39
5.1.20.0080.0238.41
5.1.10.0030.0278.14
5.1.00.0030.0268.14
5.0.50.0020.0226.62
5.0.40.0030.0206.47
5.0.30.0050.0306.29
5.0.20.0040.0196.26
5.0.10.0040.0196.23
5.0.00.0050.0296.23
4.4.90.0010.0174.78
4.4.80.0030.0154.75
4.4.70.0030.0154.75
4.4.60.0020.0164.75
4.4.50.0010.0174.77
4.4.40.0020.0254.71
4.4.30.0020.0164.76
4.4.20.0040.0144.85
4.4.10.0020.0164.85
4.4.00.0040.0244.76
4.3.110.0030.0154.67
4.3.100.0040.0144.67
4.3.90.0020.0154.63
4.3.80.0040.0314.58
4.3.70.0060.0144.63
4.3.60.0030.0154.63
4.3.50.0040.0144.63
4.3.40.0020.0254.54
4.3.30.0040.0143.28
4.3.20.0020.0163.26
4.3.10.0010.0193.22
4.3.00.0070.0207.30

preferences:
42.94 ms | 401 KiB | 5 Q