3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( array('status'=>'OK','Productname'=>'test1'), array('status'=>'OK','Productname'=>'test1'), array('status'=>'OK','Productname'=>'test2'), array('status'=>'OK','Productname'=>'test2') ); $notToDuplicate = array('test1'); $counts = array_count_values($array); var_dump($counts); $unique = array_unique($arr, SORT_REGULAR); //$newArray = array_fill(0, $counts['apple']-2, 'apple');

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.0180.00318.68
8.3.50.0110.00522.06
8.3.40.0180.00418.69
8.3.30.0040.01118.97
8.3.20.0040.00420.04
8.3.10.0080.00022.14
8.3.00.0000.00822.49
8.2.180.0140.00718.54
8.2.170.0060.00922.96
8.2.160.0090.00620.80
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00719.36
8.2.110.0030.00622.29
8.2.100.0060.00617.72
8.2.90.0040.00419.22
8.2.80.0000.00818.04
8.2.70.0050.00517.50
8.2.60.0030.00617.91
8.2.50.0000.00818.07
8.2.40.0080.00018.03
8.2.30.0040.00417.98
8.2.20.0000.00717.57
8.2.10.0070.00017.61
8.2.00.0050.00317.78
8.1.280.0110.01125.92
8.1.270.0050.00224.01
8.1.260.0050.00326.35
8.1.250.0030.00528.09
8.1.240.0130.00323.69
8.1.230.0040.00718.97
8.1.220.0080.00017.76
8.1.210.0040.00418.77
8.1.200.0030.00617.00
8.1.190.0050.00317.40
8.1.180.0040.00418.10
8.1.170.0060.00318.52
8.1.160.0000.00821.92
8.1.150.0050.00218.50
8.1.140.0040.00417.34
8.1.130.0030.00317.72
8.1.120.0000.00717.38
8.1.110.0020.00517.38
8.1.100.0070.00017.34
8.1.90.0000.00717.34
8.1.80.0000.00717.36
8.1.70.0000.00717.29
8.1.60.0060.00317.47
8.1.50.0050.00217.48
8.1.40.0040.00417.51
8.1.30.0100.00017.60
8.1.20.0080.00017.51
8.1.10.0000.00717.60
8.1.00.0040.00417.54
8.0.300.0000.00718.77
8.0.290.0070.00016.93
8.0.280.0030.00318.29
8.0.270.0030.00317.09
8.0.260.0030.00616.82
8.0.250.0040.00416.98
8.0.240.0030.00316.88
8.0.230.0070.00016.92
8.0.220.0000.00816.87
8.0.210.0070.00016.75
8.0.200.0000.00616.95
8.0.190.0070.00016.83
8.0.180.0000.00916.90
8.0.170.0000.00716.90
8.0.160.0000.00716.91
8.0.150.0000.00716.84
8.0.140.0050.00216.77
8.0.130.0060.00013.37
8.0.120.0000.00716.86
8.0.110.0050.00216.84
8.0.100.0000.00816.74
8.0.90.0000.00816.89
8.0.80.0090.00616.88
8.0.70.0050.00216.76
8.0.60.0070.00016.84
8.0.50.0070.00016.89
8.0.30.0100.01317.08
8.0.20.0080.01117.40
8.0.10.0050.00217.06
8.0.00.0100.00816.58
7.4.330.0000.00515.04
7.4.320.0040.00416.45
7.4.300.0000.00616.43
7.4.290.0050.00216.51
7.4.280.0050.00216.54
7.4.270.0070.00016.43
7.4.260.0080.00016.52
7.4.250.0000.00716.48
7.4.240.0030.00316.41
7.4.230.0030.00316.41
7.4.220.0070.01116.45
7.4.210.0060.00916.52
7.4.200.0070.00016.43
7.4.190.0000.00716.40
7.4.160.0080.00816.46
7.4.150.0140.01017.40
7.4.140.0140.00717.86
7.4.130.0080.00816.40
7.4.120.0080.00816.36
7.4.110.0060.01316.52
7.4.100.0110.01116.52
7.4.90.0140.00316.42
7.4.80.0070.01119.39
7.4.70.0050.01016.52
7.4.60.0140.00416.44
7.4.50.0060.00316.32
7.4.40.0070.00722.77
7.4.30.0160.00616.46
7.4.00.0060.00914.83
7.3.330.0000.00512.92
7.3.320.0000.00613.05
7.3.310.0040.00416.15
7.3.300.0030.00316.14
7.3.290.0090.00616.23
7.3.280.0050.01116.17
7.3.270.0160.00617.40
7.3.260.0080.00816.27
7.3.250.0130.00816.23
7.3.240.0130.00316.33
7.3.230.0050.01416.39
7.3.210.0130.00316.57
7.3.200.0080.01519.39
7.3.190.0060.01116.36
7.3.180.0110.00416.18
7.3.170.0090.00616.50
7.3.160.0030.01316.24
7.3.120.0130.00314.37
7.2.330.0090.01516.55
7.2.320.0130.00916.24
7.2.310.0100.01316.47
7.2.300.0060.01016.31
7.2.290.0090.00916.57
7.2.00.0030.00619.30
7.1.100.0030.00918.02
7.1.70.0120.01216.94
7.1.60.0000.02419.82
7.1.50.0070.01416.80
7.1.00.0030.07722.45
7.0.200.0040.00416.38
7.0.140.0030.07322.00
7.0.60.0030.08319.85
7.0.50.0100.05717.94
7.0.40.0070.05320.21
7.0.30.0130.04720.34
7.0.20.0170.04020.15
7.0.10.0200.04020.12
7.0.00.0170.07020.13
5.6.280.0000.07721.02
5.6.210.0100.07720.60
5.6.200.0070.08318.11
5.6.190.0000.07720.57
5.6.180.4300.04020.63
5.6.170.0230.05720.47
5.6.160.0100.08020.52
5.6.150.0000.04318.07
5.6.140.0030.07018.16
5.6.130.0100.06718.21
5.6.120.0070.04020.97
5.6.110.0100.07321.00
5.6.100.0100.06721.04
5.6.90.0170.06320.92
5.6.80.0000.06320.39
5.5.350.0030.07720.43
5.5.340.0000.04318.01
5.5.330.0130.07020.28
5.5.320.0230.06320.21
5.5.310.0330.07320.25
5.5.300.0030.06018.00
5.5.290.0000.06018.03
5.5.280.0000.04320.87
5.5.270.0070.04320.85
5.5.260.0200.07020.79
5.5.250.0100.08320.49
5.5.240.0130.05020.25
5.4.450.0200.06719.60
5.4.440.0800.06019.27
5.4.430.0230.07319.25
5.4.420.0100.05319.68
5.4.410.0070.05718.79
5.4.400.0330.05718.72
5.4.390.0330.05718.59
5.4.380.0170.05718.77
5.4.370.0130.05018.72
5.4.360.0230.03318.46
5.4.350.0070.03411.98
5.4.340.0130.04811.97
5.4.320.0090.03612.46
5.4.310.0050.03812.45
5.4.300.0060.03912.45
5.4.290.0080.04112.45
5.4.280.0060.03612.35
5.4.270.0050.03812.32
5.4.260.0080.03612.32
5.4.250.0080.03612.32
5.4.240.0060.03712.32
5.4.230.0080.03812.31
5.4.220.0080.03712.31
5.4.210.0080.04712.31
5.4.200.0090.04512.31
5.4.190.0080.04712.30
5.4.180.0060.04812.30
5.4.170.0080.05112.32
5.4.160.0070.03712.31
5.4.150.0070.03612.30
5.4.140.0060.04211.99
5.4.130.0080.03711.98
5.4.120.0100.04111.93
5.4.110.0090.05011.93
5.4.100.0090.04211.93
5.4.90.0120.03711.93
5.4.80.0080.04411.93
5.4.70.0090.06411.93
5.4.60.0040.06011.93
5.4.50.0070.05511.93
5.4.40.0120.04711.91
5.4.30.0070.04111.91
5.4.20.0090.04111.91
5.4.10.0110.04211.91
5.4.00.0070.03811.40
5.3.290.0070.04112.80
5.3.280.0060.04012.71
5.3.270.0040.04412.72
5.3.260.0120.04312.72
5.3.250.0120.04612.72
5.3.240.0090.04012.72
5.3.230.0080.03812.71
5.3.220.0060.03912.68
5.3.210.0090.04612.68
5.3.200.0060.03712.68
5.3.190.0060.04012.68
5.3.180.0060.03712.68
5.3.170.0080.04212.67
5.3.160.0060.04212.67
5.3.150.0060.03812.67
5.3.140.0040.03912.66
5.3.130.0070.03812.65
5.3.120.0100.04612.66
5.3.110.0060.04112.66
5.3.100.0030.04112.12
5.3.90.0060.03712.09
5.3.80.0050.03912.07
5.3.70.0050.03812.08
5.3.60.0070.04012.06
5.3.50.0090.05412.00
5.3.40.0140.05312.00
5.3.30.0110.05111.94
5.3.20.0090.04111.70
5.3.10.0050.03611.66
5.3.00.0050.03711.65
5.2.170.0070.0319.15
5.2.160.0050.0329.15
5.2.150.0070.0339.15
5.2.140.0050.0399.14
5.2.130.0100.0429.11
5.2.120.0090.0369.11
5.2.110.0070.0389.11
5.2.100.0070.0329.11
5.2.90.0020.0349.11
5.2.80.0010.0369.11
5.2.70.0060.0429.10
5.2.60.0070.0399.05
5.2.50.0100.0499.03
5.2.40.0080.0649.00
5.2.30.0060.0388.98
5.2.20.0060.0308.96
5.2.10.0040.0318.89
5.2.00.0060.0458.75
5.1.60.0050.0348.04
5.1.50.0050.0368.03
5.1.40.0080.0328.02
5.1.30.0050.0338.37
5.1.20.0090.0248.39
5.1.10.0040.0308.12
5.1.00.0060.0358.11
5.0.50.0040.0256.59
5.0.40.0070.0186.45
5.0.30.0050.0336.26
5.0.20.0020.0226.24
5.0.10.0050.0226.21
5.0.00.0040.0306.21
4.4.90.0030.0154.78
4.4.80.0040.0144.75
4.4.70.0010.0194.75
4.4.60.0070.0124.75
4.4.50.0050.0134.77
4.4.40.0040.0244.70
4.4.30.0040.0194.76
4.4.20.0050.0144.84
4.4.10.0040.0154.85
4.4.00.0050.0364.76
4.3.110.0020.0174.67
4.3.100.0020.0214.66
4.3.90.0030.0194.64
4.3.80.0040.0304.59
4.3.70.0030.0154.63
4.3.60.0030.0164.63
4.3.50.0050.0144.63
4.3.40.0050.0234.54
4.3.30.0030.0193.27
4.3.20.0000.0203.25
4.3.10.0020.0183.21
4.3.00.0000.0276.93

preferences:
37.55 ms | 401 KiB | 5 Q