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); $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); /* usort($a, 'strcmp'); print_r($a); */

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.01416.63
8.3.50.0090.01021.98
8.3.40.0140.00318.84
8.3.30.0040.01118.79
8.3.20.0090.00020.16
8.3.10.0080.00023.62
8.3.00.0030.00619.15
8.2.180.0070.00716.63
8.2.170.0100.01022.96
8.2.160.0030.01020.43
8.2.150.0050.00324.18
8.2.140.0070.00024.66
8.2.130.0030.00619.51
8.2.120.0040.00426.35
8.2.110.0040.00820.83
8.2.100.0090.00317.75
8.2.90.0050.00319.29
8.2.80.0000.00817.97
8.2.70.0080.00017.38
8.2.60.0000.00818.03
8.2.50.0000.00918.07
8.2.40.0080.00019.28
8.2.30.0000.00720.66
8.2.20.0070.00317.76
8.2.10.0070.00018.17
8.2.00.0060.00318.00
8.1.280.0070.01425.92
8.1.270.0060.00323.76
8.1.260.0070.00028.09
8.1.250.0040.00428.09
8.1.240.0060.00322.52
8.1.230.0070.00417.66
8.1.220.0030.00517.74
8.1.210.0080.00018.77
8.1.200.0060.00317.35
8.1.190.0000.00717.64
8.1.180.0040.00418.10
8.1.170.0080.00018.38
8.1.160.0030.00521.94
8.1.150.0040.00418.91
8.1.140.0080.00019.51
8.1.130.0000.00717.75
8.1.120.0000.00717.50
8.1.110.0040.00417.53
8.1.100.0030.00517.43
8.1.90.0050.00217.47
8.1.80.0000.00817.49
8.1.70.0030.00317.41
8.1.60.0040.00417.48
8.1.50.0050.00317.46
8.1.40.0040.00417.54
8.1.30.0040.00417.68
8.1.20.0030.00517.57
8.1.10.0060.00317.60
8.1.00.0030.00517.43
8.0.300.0000.00818.77
8.0.290.0000.00816.75
8.0.280.0040.00418.55
8.0.270.0000.00717.29
8.0.260.0080.00017.28
8.0.250.0030.00316.93
8.0.240.0000.00717.00
8.0.230.0000.00717.03
8.0.220.0030.00716.93
8.0.210.0000.00716.91
8.0.200.0030.00316.95
8.0.190.0000.00816.99
8.0.180.0000.00716.97
8.0.170.0070.00016.93
8.0.160.0040.00416.80
8.0.150.0070.00416.87
8.0.140.0070.00016.73
8.0.130.0000.00613.33
8.0.120.0080.00016.83
8.0.110.0040.00416.95
8.0.100.0070.00016.89
8.0.90.0080.00016.80
8.0.80.0030.01316.84
8.0.70.0030.00516.79
8.0.60.0040.00416.81
8.0.50.0050.00216.86
8.0.30.0140.00816.99
8.0.20.0160.01017.41
8.0.10.0050.00316.91
8.0.00.0110.00616.77
7.4.330.0000.00516.75
7.4.320.0000.00716.50
7.4.300.0060.00016.54
7.4.290.0000.00716.43
7.4.280.0080.00016.52
7.4.270.0030.00316.53
7.4.260.0080.00316.49
7.4.250.0000.00716.47
7.4.240.0060.00216.57
7.4.230.0000.00716.45
7.4.220.0150.00616.59
7.4.210.0000.01416.61
7.4.200.0000.00716.34
7.4.160.0180.00416.62
7.4.150.0190.01217.40
7.4.140.0120.00617.86
7.4.130.0100.00716.38
7.4.120.0120.00616.61
7.4.110.0040.01616.45
7.4.100.0100.01016.41
7.4.90.0090.01416.51
7.4.80.0040.01919.39
7.4.70.0120.00616.33
7.4.60.0060.01316.57
7.4.50.0100.00716.37
7.4.40.0160.00016.52
7.4.30.0040.01416.46
7.4.00.0090.00714.88
7.3.330.0050.00013.13
7.3.320.0000.00613.27
7.3.310.0000.00716.36
7.3.300.0050.00216.37
7.3.290.0060.00816.27
7.3.280.0110.00816.31
7.3.270.0170.00717.40
7.3.260.0060.01116.35
7.3.250.0100.00716.41
7.3.240.0150.00616.29
7.3.230.0130.00316.39
7.3.210.0070.01116.36
7.3.200.0040.01216.59
7.3.190.0000.01916.58
7.3.180.0070.01416.24
7.3.170.0110.01116.27
7.3.160.0080.00816.38
7.3.120.0030.01314.76
7.3.110.0110.00414.90
7.3.100.0170.00014.81
7.3.90.0000.01014.76
7.3.80.0070.00714.77
7.3.70.0030.01214.72
7.3.60.0060.00914.96
7.3.50.0090.00914.84
7.3.40.0070.01014.54
7.3.30.0030.01214.70
7.3.20.0030.01016.67
7.3.10.0000.01316.55
7.3.00.0090.00616.71
7.2.330.0120.00416.76
7.2.320.0090.01516.45
7.2.310.0140.00316.58
7.2.300.0090.00916.85
7.2.290.0100.01016.85
7.2.250.0030.01415.31
7.2.240.0030.01715.10
7.2.230.0120.00415.26
7.2.220.0030.01015.30
7.2.210.0150.00015.33
7.2.200.0040.00815.00
7.2.190.0100.00714.96
7.2.180.0090.00915.07
7.2.170.0070.00415.04
7.2.60.0140.01016.86
7.2.00.0100.01019.46
7.1.330.0060.00915.90
7.1.320.0000.01715.80
7.1.310.0040.00815.88
7.1.300.0070.00715.74
7.1.290.0040.01115.52
7.1.280.0030.00616.02
7.1.270.0040.00715.81
7.1.260.0100.00715.98
7.1.200.0060.00615.70
7.1.100.0000.01118.14
7.1.70.0000.00816.90
7.1.60.0230.00319.36
7.1.50.0030.01917.02
7.1.00.0070.07322.31
7.0.200.0100.00016.73
7.0.60.0100.05320.02
7.0.50.0100.07717.87
7.0.40.0170.03320.02
7.0.30.0330.07320.34
7.0.20.0300.06320.25
7.0.10.0070.08320.26
7.0.00.0070.08020.10
5.6.280.0030.05021.07
5.6.210.0170.07720.57
5.6.200.0070.09018.19
5.6.190.0030.09020.47
5.6.180.0230.05320.48
5.6.170.0270.07320.54
5.6.160.0030.04320.47
5.6.150.0070.03318.14
5.6.140.0030.08018.27
5.6.130.0000.05318.19
5.6.120.0170.08021.02
5.6.110.0170.07020.99
5.6.100.0070.08320.98
5.6.90.0130.08021.13
5.6.80.0100.05020.54
5.5.350.0230.07020.34
5.5.340.0070.07318.04
5.5.330.0130.07020.19
5.5.320.0370.03720.26
5.5.310.0270.03720.30
5.5.300.0030.04017.98
5.5.290.0030.05717.99
5.5.280.0030.09020.87
5.5.270.0070.07320.85
5.5.260.0170.07720.77
5.5.250.0070.08720.69
5.5.240.0330.06720.30

preferences:
40.82 ms | 401 KiB | 5 Q