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_map(function($item) { return $item; }, $this->data); $data = array_merge($this->data); sort($data); $rs = implode('-', $data); echo $rs."\n"; return $rs; } } // expected order is ['a','b'],['c','b','a'],['c','b'] $a = [ new SortMadness(array('c','b')), new SortMadness(array('c','b','a')), new SortMadness(array('a','b')), ]; sort($a); print_r($a); 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.70.0120.00316.50
8.3.60.0220.00016.38
8.3.50.0080.01122.11
8.3.40.0090.00618.97
8.3.30.0070.01118.45
8.3.20.0000.01020.34
8.3.10.0000.00823.35
8.3.00.0080.00019.38
8.2.180.0120.00918.41
8.2.170.0140.00722.96
8.2.160.0040.01120.39
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0040.00417.50
8.2.120.0070.00026.35
8.2.110.0030.00719.45
8.2.100.0120.00017.84
8.2.90.0040.00419.40
8.2.80.0000.00817.97
8.2.70.0040.00417.61
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0000.00719.39
8.2.30.0040.00420.50
8.2.20.0060.00317.56
8.2.10.0040.00417.98
8.2.00.0080.00017.98
8.1.280.0100.01025.92
8.1.270.0060.00323.97
8.1.260.0080.00028.09
8.1.250.0000.00828.09
8.1.240.0030.01421.24
8.1.230.0030.00917.42
8.1.220.0080.00017.74
8.1.210.0030.00718.77
8.1.200.0060.00317.47
8.1.190.0030.00517.35
8.1.180.0030.00518.10
8.1.170.0030.00618.72
8.1.160.0000.00722.02
8.1.150.0040.00418.88
8.1.140.0030.00519.50
8.1.130.0030.00317.63
8.1.120.0000.00717.30
8.1.110.0040.00417.48
8.1.100.0000.00717.37
8.1.90.0040.00417.48
8.1.80.0050.00317.45
8.1.70.0000.00717.45
8.1.60.0040.00417.58
8.1.50.0000.00817.54
8.1.40.0050.00317.49
8.1.30.0000.00817.67
8.1.20.0040.00417.57
8.1.10.0060.00317.45
8.1.00.0080.00017.51
8.0.300.0000.00718.77
8.0.290.0060.00316.63
8.0.280.0040.00418.48
8.0.270.0000.00717.16
8.0.260.0030.00717.20
8.0.250.0060.00017.00
8.0.240.0000.00717.02
8.0.230.0040.00416.96
8.0.220.0090.00016.83
8.0.210.0000.00916.80
8.0.200.0030.00316.94
8.0.190.0080.00016.83
8.0.180.0080.00016.90
8.0.170.0040.00416.93
8.0.160.0000.00716.91
8.0.150.0090.00016.88
8.0.140.0000.00816.89
8.0.130.0000.00513.28
8.0.120.0000.00816.89
8.0.110.0050.00316.79
8.0.100.0040.00416.80
8.0.90.0000.00716.93
8.0.80.0120.00616.84
8.0.70.0060.00316.68
8.0.60.0000.00816.92
8.0.50.0070.00016.75
8.0.30.0120.00717.01
8.0.20.0120.00917.40
8.0.10.0040.00416.80
8.0.00.0070.01116.70
7.4.330.0020.00216.71
7.4.320.0000.00716.63
7.4.300.0000.00616.49
7.4.290.0080.00016.51
7.4.280.0040.00416.35
7.4.270.0070.00016.53
7.4.260.0080.00016.55
7.4.250.0040.00416.62
7.4.240.0050.00216.57
7.4.230.0000.00816.54
7.4.220.0100.01016.63
7.4.210.0070.01016.64
7.4.200.0000.00716.40
7.4.160.0070.01116.50
7.4.150.0160.00317.40
7.4.140.0170.00617.86
7.4.130.0070.01016.52
7.4.120.0110.00916.59
7.4.110.0110.00716.58
7.4.100.0000.01716.51
7.4.90.0080.00816.35
7.4.80.0030.01319.39
7.4.70.0090.01216.59
7.4.60.0070.01016.39
7.4.50.0000.01616.28
7.4.40.0030.01316.61
7.4.30.0150.00616.72
7.4.00.0060.00614.94
7.3.330.0040.00413.23
7.3.320.0050.00013.31
7.3.310.0000.00716.33
7.3.300.0030.00316.27
7.3.290.0070.00416.28
7.3.280.0090.00916.32
7.3.270.0070.01017.40
7.3.260.0130.00316.28
7.3.250.0130.00816.39
7.3.240.0080.00916.37
7.3.230.0040.01216.44
7.3.210.0030.01816.56
7.3.200.0060.00916.14
7.3.190.0180.00316.56
7.3.180.0160.00016.33
7.3.170.0090.00916.27
7.3.160.0110.00516.61
7.2.330.0090.00816.47
7.2.320.0100.01016.78
7.2.310.0140.00316.40
7.2.300.0130.00316.39
7.2.290.0150.00316.76
7.2.60.0080.00616.98
7.2.00.0180.01019.36
7.1.200.0030.01015.80
7.1.100.0000.01017.85
7.1.70.0060.00317.04
7.1.60.0090.01519.36
7.1.50.0000.02117.02
7.1.00.0070.07022.31
7.0.200.0000.00916.82
7.0.60.0100.08319.96
7.0.50.0100.04317.87
7.0.40.0130.05320.04
7.0.30.0370.07320.27
7.0.20.0300.07320.30
7.0.10.0070.07720.18
7.0.00.0070.08320.09
5.6.280.0030.03321.05
5.6.210.0070.04320.71
5.6.200.0070.07318.12
5.6.190.0030.06720.55
5.6.180.0270.06020.64
5.6.170.0300.05020.44
5.6.160.0130.07720.60
5.6.150.0100.05718.15
5.6.140.0030.05718.17
5.6.130.0100.06718.14
5.6.120.0100.05321.15
5.6.110.0100.05321.00
5.6.100.0100.08021.00
5.6.90.0070.06721.11
5.6.80.0030.08320.54
5.5.350.0200.08720.45
5.5.340.0070.03718.03
5.5.330.0130.05020.21
5.5.320.0300.04720.25
5.5.310.0270.07320.24
5.5.300.0070.07018.08
5.5.290.0200.07017.92
5.5.280.0130.04320.88
5.5.270.0000.04320.98
5.5.260.0130.05720.67
5.5.250.0130.07720.47
5.5.240.0230.06720.28

preferences:
59.84 ms | 401 KiB | 5 Q