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($arr); 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.0120.00918.68
8.3.50.0070.00921.99
8.3.40.0110.00418.67
8.3.30.0000.01518.96
8.3.20.0000.00820.10
8.3.10.0040.00422.05
8.3.00.0040.00422.37
8.2.180.0120.00816.50
8.2.170.0140.00322.96
8.2.160.0030.01020.80
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00019.23
8.2.110.0100.00722.20
8.2.100.0040.00817.84
8.2.90.0040.00419.23
8.2.80.0000.00817.97
8.2.70.0100.00017.35
8.2.60.0030.00617.93
8.2.50.0000.00818.07
8.2.40.0060.00318.22
8.2.30.0040.00417.86
8.2.20.0000.00817.45
8.2.10.0000.00717.59
8.2.00.0040.00417.56
8.1.280.0170.00325.92
8.1.270.0040.00423.96
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0130.00323.84
8.1.230.0050.00518.98
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0050.00217.43
8.1.180.0040.00418.10
8.1.170.0060.00318.33
8.1.160.0000.00721.96
8.1.150.0000.00818.63
8.1.140.0000.00817.38
8.1.130.0060.00017.81
8.1.120.0000.00717.38
8.1.110.0030.00517.41
8.1.100.0000.00717.36
8.1.90.0030.00517.27
8.1.80.0050.00217.36
8.1.70.0000.00717.33
8.1.60.0000.00917.50
8.1.50.0070.00017.43
8.1.40.0040.00417.47
8.1.30.0070.00317.57
8.1.20.0080.00017.47
8.1.10.0050.00317.42
8.1.00.0040.00417.39
8.0.300.0040.00418.77
8.0.290.0040.00417.15
8.0.280.0000.00718.28
8.0.270.0070.00017.13
8.0.260.0050.00516.79
8.0.250.0000.00716.84
8.0.240.0040.00416.89
8.0.230.0030.00317.00
8.0.220.0030.00316.92
8.0.210.0030.00316.86
8.0.200.0070.00016.79
8.0.190.0040.00416.97
8.0.180.0050.00316.86
8.0.170.0070.00016.96
8.0.160.0000.00716.91
8.0.150.0000.00716.84
8.0.140.0040.00416.73
8.0.130.0000.00613.33
8.0.120.0040.00416.82
8.0.110.0040.00416.88
8.0.100.0040.00416.68
8.0.90.0070.00016.71
8.0.80.0100.00616.89
8.0.70.0040.00416.90
8.0.60.0000.00716.90
8.0.50.0020.00516.74
8.0.30.0130.01116.99
8.0.20.0100.01017.40
8.0.10.0040.00416.86
8.0.00.0100.00816.73
7.4.330.0000.00515.00
7.4.320.0030.00316.57
7.4.300.0000.00616.38
7.4.290.0000.00716.53
7.4.280.0000.00616.41
7.4.270.0000.00716.43
7.4.260.0000.00716.41
7.4.250.0030.00316.45
7.4.240.0020.00516.52
7.4.230.0000.00716.46
7.4.220.0150.00416.45
7.4.210.0100.00616.49
7.4.200.0000.00716.33
7.4.190.0000.00716.23
7.4.160.0120.00316.46
7.4.150.0110.01517.40
7.4.140.0050.01517.86
7.4.130.0080.00916.48
7.4.120.0130.00716.48
7.4.110.0120.00816.50
7.4.100.0130.01016.27
7.4.90.0130.00416.38
7.4.80.0030.01719.39
7.4.70.0060.01016.26
7.4.60.0030.01316.43
7.4.50.0000.00516.27
7.4.40.0030.01222.77
7.4.30.0100.01116.51
7.4.00.0030.01214.87
7.3.330.0050.00013.09
7.3.320.0020.00213.03
7.3.310.0050.00316.13
7.3.300.0000.00716.29
7.3.290.0100.00316.26
7.3.280.0070.00816.16
7.3.270.0070.01017.40
7.3.260.0100.00616.29
7.3.250.0110.01116.19
7.3.240.0140.00716.20
7.3.230.0070.01016.39
7.3.210.0180.00716.25
7.3.200.0100.00719.39
7.3.190.0120.01016.25
7.3.180.0090.00616.24
7.3.170.0130.00316.27
7.3.160.0070.01416.45
7.3.120.0030.01214.93
7.3.00.0100.00316.56
7.2.330.0090.00916.30
7.2.320.0090.01216.58
7.2.310.0090.00616.42
7.2.300.0060.01016.27
7.2.290.0070.01516.50
7.2.130.0060.00316.95
7.2.120.0060.00916.74
7.2.110.0100.00316.88
7.2.100.0140.00016.88
7.2.90.0090.00616.87
7.2.80.0070.00716.66
7.2.70.0080.00416.94
7.2.60.0110.00316.65
7.2.50.0040.00716.74
7.2.40.0070.00716.81
7.2.30.0030.01016.62
7.2.20.0070.00316.73
7.2.10.0060.00916.75
7.2.00.0020.01317.97
7.1.250.0050.00815.78
7.1.240.0090.00315.57
7.1.230.0000.01015.78
7.1.220.0070.00715.72
7.1.210.0030.01315.79
7.1.200.0040.00715.49
7.1.190.0100.00315.81
7.1.180.0030.01315.61
7.1.170.0030.00915.60
7.1.160.0000.00915.55
7.1.150.0040.00715.79
7.1.140.0090.00615.80
7.1.130.0030.01015.63
7.1.120.0100.00315.69
7.1.110.0070.00415.61
7.1.100.0030.00716.83
7.1.90.0030.01015.89
7.1.80.0040.01115.43
7.1.70.0070.00716.10
7.1.60.0050.01217.58
7.1.50.0060.00916.22
7.1.40.0100.00315.86
7.1.30.0110.00315.64
7.1.20.0070.00715.61
7.1.10.0000.01115.56
7.1.00.0020.04419.01
7.0.330.0000.01015.11
7.0.320.0140.00015.43
7.0.310.0060.00615.00
7.0.300.0120.00015.29
7.0.290.0040.00815.28
7.0.280.0030.00915.34
7.0.270.0030.01015.26
7.0.260.0030.01015.28
7.0.250.0110.00415.23
7.0.240.0060.00615.32
7.0.230.0040.01115.29
7.0.220.0030.01115.30
7.0.210.0060.00615.10
7.0.200.0010.00816.07
7.0.190.0030.00915.34
7.0.180.0000.01515.29
7.0.170.0030.00915.35
7.0.160.0030.00715.37
7.0.150.0000.01215.55
7.0.140.0020.04218.62
7.0.130.0000.00715.41
7.0.120.0130.00315.33
7.0.110.0080.00315.52
7.0.100.0100.00315.07
7.0.90.0060.00315.41
7.0.80.0030.00615.33
7.0.70.0120.00314.88
7.0.60.0080.04317.54
7.0.50.0080.03716.40
7.0.40.0050.03116.82
7.0.30.0190.04016.69
7.0.20.0180.03116.75
7.0.10.0070.04416.80
7.0.00.0090.04216.66
5.6.380.0000.01313.98
5.6.370.0060.00614.27
5.6.360.0040.00714.16
5.6.350.0030.01314.16
5.6.340.0000.01313.94
5.6.330.0030.01014.31
5.6.320.0090.00614.41
5.6.310.0000.01314.23
5.6.300.0060.00914.36
5.6.290.0030.00613.88
5.6.280.0070.03617.66
5.6.270.0090.00314.53
5.6.260.0070.01013.87
5.6.250.0000.01414.06
5.6.240.0030.01014.25
5.6.230.0110.00314.42
5.6.220.0070.00414.02
5.6.210.0090.04517.36
5.6.200.0070.02716.15
5.6.190.0030.03117.15
5.6.180.0070.03017.37
5.6.170.0120.04817.25
5.6.160.0130.03817.33
5.6.150.0050.04316.23
5.6.140.0110.04016.16
5.6.130.0070.04516.12
5.6.120.0050.04517.67
5.6.110.0030.04717.61
5.6.100.0050.02417.61
5.6.90.0100.04017.58
5.6.80.0050.02217.30
5.6.70.0030.01014.01
5.6.60.0030.00714.02
5.6.50.0040.00413.93
5.6.40.0080.00414.33
5.6.30.0040.00714.24
5.6.20.0030.00614.21
5.6.10.0040.01114.09
5.6.00.0070.00314.07
5.5.380.0070.00311.60
5.5.370.0060.00311.60
5.5.360.0040.00711.60
5.5.350.1400.02215.97
5.5.340.0000.03314.76
5.5.330.0070.04015.98
5.5.320.0040.02215.95
5.5.310.0050.04816.01
5.5.300.0030.02214.79
5.5.290.0060.04314.78
5.5.280.0070.04116.29
5.5.270.0040.02216.17
5.5.260.0090.02016.29
5.5.250.0070.02716.10
5.5.240.0090.03715.83
5.5.230.0000.01011.60
5.5.220.0060.00611.60
5.5.210.0030.00311.60
5.5.200.0080.00311.60
5.5.190.0060.00311.60
5.5.180.0000.00911.60
5.5.170.0000.00611.60
5.5.160.0030.00311.60
5.5.150.0000.00611.60
5.5.140.0030.00311.60
5.5.130.0080.00311.60
5.5.120.0000.00711.60
5.5.110.0030.00311.60
5.5.100.0060.00611.60
5.5.90.0000.00711.60
5.5.80.0030.00911.60
5.5.70.0030.00711.60
5.5.60.0030.00911.60
5.5.50.0000.01011.60
5.5.40.0040.00411.60
5.5.30.0000.00611.60
5.5.20.0060.00611.60
5.5.10.0060.00611.60
5.5.00.0000.01211.60
5.4.450.1110.02215.53
5.4.440.0970.02415.50
5.4.430.1110.02315.36
5.4.420.1180.02615.58
5.4.410.1020.02315.52
5.4.400.1250.02415.43
5.4.390.1130.02115.37
5.4.380.1030.02415.34
5.4.370.1070.02215.34
5.4.360.1300.02415.42
5.4.350.1090.02015.38
5.4.340.1550.01915.26
5.4.330.0050.00211.60
5.4.320.1090.02215.35
5.4.310.1140.01915.34
5.4.300.1170.02315.24
5.4.290.1130.02215.34
5.4.280.0970.02215.41
5.4.270.1160.02115.38
5.4.260.1050.02315.38
5.4.250.1100.01815.42
5.4.240.1280.02115.36
5.4.230.1110.02315.24
5.4.220.1100.01715.33
5.4.210.1070.01915.19
5.4.200.1030.02215.41
5.4.190.1030.02215.40
5.4.180.1030.02415.27
5.4.170.1030.02215.41
5.4.160.1080.02015.19
5.4.150.1010.02115.18
5.4.140.0970.02014.02
5.4.130.1250.02313.96
5.4.120.1030.02513.98
5.4.110.1200.02413.92
5.4.100.1120.03114.02
5.4.90.1000.02214.06
5.4.80.1080.02413.90
5.4.70.1150.02514.03
5.4.60.1170.02314.04
5.4.50.1120.01813.99
5.4.40.0950.02313.88
5.4.30.1090.02013.98
5.4.20.1210.02014.02
5.4.10.1150.02013.98
5.4.00.1000.02213.68
5.3.290.1180.02213.06
5.3.280.1200.02713.12
5.3.270.1150.02513.15
5.3.260.1220.02513.12
5.3.250.1220.01713.03
5.3.240.1160.02413.13
5.3.230.1250.01813.02
5.3.220.1190.02213.01
5.3.210.1220.02213.13
5.3.200.1220.02013.01
5.3.190.1170.02413.06
5.3.180.1020.02413.09
5.3.170.1150.02713.05
5.3.160.1250.02413.01
5.3.150.1170.02313.00
5.3.140.1250.01713.06
5.3.130.1150.02312.99
5.3.120.1320.02113.12
5.3.110.1200.02813.04
5.3.100.1060.02312.75
5.3.90.1170.02212.78
5.3.80.1110.01912.73
5.3.70.1290.01712.70
5.3.60.1300.02212.83
5.3.50.1070.02312.66
5.3.40.1050.02212.74
5.3.30.1260.01812.73
5.3.20.1200.02512.57
5.3.10.0960.02612.56
5.3.00.1220.01812.55
5.2.170.0950.02111.33
5.2.160.0930.01811.30
5.2.150.0850.01911.29
5.2.140.1060.01511.40
5.2.130.1040.01511.27
5.2.120.0980.02011.43
5.2.110.1020.01711.36
5.2.100.0900.02011.36
5.2.90.1000.01811.37
5.2.80.1000.01811.27
5.2.70.0970.02311.37
5.2.60.0970.02111.35
5.2.50.0900.01711.28
5.2.40.0870.01311.32
5.2.30.0700.01811.21
5.2.20.0830.02111.30
5.2.10.0840.01811.21
5.2.00.0780.02111.09
5.1.60.0770.01310.76
5.1.50.0720.01210.74
5.1.40.0690.01610.81
5.1.30.0770.01211.02
5.1.20.0800.01811.03
5.1.10.0830.01910.78
5.1.00.0760.01610.83
5.0.50.0400.01710.06
5.0.40.0360.0109.95
5.0.30.0450.0239.86
5.0.20.0380.0129.89
5.0.10.0480.0179.83
5.0.00.0450.0159.88
4.4.90.0190.0129.42
4.4.80.0020.0199.42
4.4.70.0000.0149.42
4.4.60.0030.0209.42
4.4.50.0000.0129.42
4.4.40.0030.0189.42
4.4.30.0040.0199.42
4.4.20.0030.0199.42
4.4.10.0020.0109.42
4.4.00.0020.0279.42
4.3.110.0020.0219.42
4.3.100.0380.0109.42
4.3.90.0450.0119.42
4.3.80.0450.0229.42
4.3.70.0450.0139.42
4.3.60.0350.0109.42
4.3.50.0450.0139.42
4.3.40.0360.0139.42
4.3.30.0220.0179.42
4.3.20.0180.0159.42
4.3.10.0220.0089.42
4.3.00.0170.0129.42

preferences:
102.05 ms | 401 KiB | 5 Q