3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SortMadness { private $data; public function __construct($data) { $this->data = $data; } public function __toString() { $data = array_merge($this->data); //sort($data, SORT_STRING); sort($data); $rs = implode('-', $data); echo $rs."\n"; return $rs; } } // expected result is ['c','b'],['c','b','a'] $a = array( new SortMadness(array('c','b')), new SortMadness(array('c','b','a')), new SortMadness(array('a','b','c')), ); $rs = array_unique($a, SORT_STRING); print_r($rs);

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.40.0150.00018.81
8.3.30.0140.00718.88
8.3.20.0050.00220.20
8.3.10.0040.00423.61
8.3.00.0060.00319.38
8.2.170.0180.00422.96
8.2.160.0130.00020.43
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0000.00817.63
8.2.120.0040.00426.35
8.2.110.0030.00719.32
8.2.100.0060.00617.79
8.2.90.0080.00019.30
8.2.80.0000.00817.97
8.2.70.0000.00817.75
8.2.60.0030.00517.93
8.2.50.0000.00818.07
8.2.40.0040.00419.31
8.2.30.0000.00720.64
8.2.20.0070.00317.70
8.2.10.0070.00018.17
8.2.00.0000.00817.94
8.1.270.0070.00423.97
8.1.260.0040.00428.09
8.1.250.0050.00328.09
8.1.240.0030.00621.38
8.1.230.0090.00317.52
8.1.220.0080.00017.74
8.1.210.0060.00318.77
8.1.200.0080.00317.36
8.1.190.0030.00617.38
8.1.180.0000.00718.10
8.1.170.0000.00918.46
8.1.160.0040.00421.95
8.1.150.0040.00418.90
8.1.140.0030.00519.60
8.1.130.0050.00317.59
8.1.120.0000.00717.52
8.1.110.0000.00717.54
8.1.100.0000.00817.36
8.1.90.0030.00617.38
8.1.80.0000.00717.35
8.1.70.0000.00717.31
8.1.60.0000.00717.49
8.1.50.0030.00617.52
8.1.40.0030.00517.58
8.1.30.0040.00417.60
8.1.20.0030.00617.64
8.1.10.0060.00317.61
8.1.00.0000.00717.41
8.0.300.0040.00418.77
8.0.290.0000.00716.75
8.0.280.0000.00718.47
8.0.270.0030.00317.27
8.0.260.0070.00017.19
8.0.250.0000.00616.97
8.0.240.0030.00316.98
8.0.230.0080.00016.87
8.0.220.0000.01116.79
8.0.210.0030.00316.95
8.0.200.0030.00316.97
8.0.190.0040.00416.98
8.0.180.0030.00516.81
8.0.170.0080.00016.93
8.0.160.0040.00416.81
8.0.150.0060.00316.95
8.0.140.0000.00716.87
8.0.130.0000.00513.30
8.0.120.0000.00816.96
8.0.110.0000.00816.91
8.0.100.0040.00416.93
8.0.90.0070.00016.90
8.0.80.0150.00316.89
8.0.70.0030.00716.91
8.0.60.0020.00516.87
8.0.50.0000.00716.91
8.0.30.0140.00417.23
8.0.20.0110.00917.40
8.0.10.0030.00617.06
8.0.00.0090.00816.74
7.4.330.0050.00016.88
7.4.320.0030.00316.43
7.4.300.0060.00016.57
7.4.290.0070.00016.53
7.4.280.0000.00916.53
7.4.270.0050.00216.52
7.4.260.0030.00616.64
7.4.250.0000.00716.57
7.4.240.0030.00416.55
7.4.230.0040.00416.41
7.4.220.0140.01016.51
7.4.210.0090.00916.55
7.4.200.0030.00316.43
7.4.160.0100.01016.57
7.4.150.0100.01717.40
7.4.140.0140.01017.86
7.4.130.0060.01116.68
7.4.120.0100.00716.48
7.4.110.0100.01316.59
7.4.100.0060.01216.48
7.4.90.0140.00316.41
7.4.80.0080.01519.39
7.4.70.0140.00916.52
7.4.60.0060.01016.57
7.4.50.0000.01416.53
7.4.40.0060.01416.47
7.4.30.0140.00716.61
7.4.00.0000.01514.71
7.3.330.0030.00313.29
7.3.320.0060.00013.18
7.3.310.0030.00316.37
7.3.300.0000.00716.25
7.3.290.0080.00816.27
7.3.280.0080.00816.29
7.3.270.0060.02217.40
7.3.260.0120.01216.46
7.3.250.0130.00616.29
7.3.240.0120.00916.47
7.3.230.0080.00916.64
7.3.210.0100.00616.40
7.3.200.0100.00616.45
7.3.190.0110.00716.38
7.3.180.0090.00616.48
7.3.170.0200.00316.48
7.3.160.0120.00316.41
7.2.330.0100.01016.77
7.2.320.0150.00816.76
7.2.310.0100.01016.68
7.2.300.0040.01316.80
7.2.290.0100.00716.85
7.2.60.0090.00416.48
7.2.00.0100.00719.46
7.1.200.0100.00315.90
7.1.100.0040.00418.15
7.1.70.0070.00717.20
7.1.60.0140.01019.36
7.1.50.0100.00716.94
7.1.00.0030.07722.46
7.0.200.0040.00416.74
7.0.60.0100.07719.94
7.0.50.0100.08017.86
7.0.40.0070.08719.96
7.0.30.0230.03720.13
7.0.20.0330.07020.15
7.0.10.0030.07720.22
7.0.00.0100.08020.05
5.6.280.0070.06320.90
5.6.210.0100.06320.54
5.6.200.0170.07318.25
5.6.190.0130.08020.63
5.6.180.0200.04720.41
5.6.170.0270.04720.45
5.6.160.0070.05020.70
5.6.150.0230.06318.18
5.6.140.0030.07018.21
5.6.130.0030.04018.11
5.6.120.0170.07320.99
5.6.110.0130.08021.01
5.6.100.0270.05721.12
5.6.90.0070.08720.95
5.6.80.0070.05320.44
5.5.350.0170.06720.41
5.5.340.0130.07018.02
5.5.330.0130.08320.25
5.5.320.0030.05320.51
5.5.310.0230.03720.46
5.5.300.0130.08017.94
5.5.290.0070.06317.95
5.5.280.0000.05720.88
5.5.270.0070.06720.77
5.5.260.0070.07720.80
5.5.250.0100.06320.59
5.5.240.0300.05020.07

preferences:
43.54 ms | 400 KiB | 5 Q