3v4l.org

run code in 300+ PHP versions simultaneously
<?php class test { protected $val; public function __construct($val) { $this->$val = $val; } public function getVal() { return $this->val; } } $arr = array( 'one' => new test(53), 'two' => new test(200), 'three' => new test(100) ); uasort($arr, function (test $a, test $b) { echo "comparing $a::$a->getVal() with $b::$b->getVal()"; if ($a->getVal() == $b->getVal()) { return 0; } return ($a->getVal() < $b->val()) ? -1 : 1; }); print_r($arr);

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.0150.00018.55
8.3.50.0080.01121.21
8.3.40.0110.00418.71
8.3.30.0100.00320.00
8.3.20.0060.00320.43
8.3.10.0050.00321.13
8.3.00.0000.00723.64
8.2.180.0070.01116.75
8.2.170.0150.00022.96
8.2.160.0000.01320.41
8.2.150.0000.00724.18
8.2.140.0080.00824.66
8.2.130.0000.00726.16
8.2.120.0020.00520.83
8.2.110.0060.00322.13
8.2.100.0070.00417.91
8.2.90.0060.00319.14
8.2.80.0040.00419.28
8.2.70.0080.00017.75
8.2.60.0050.00318.04
8.2.50.0000.00918.07
8.2.40.0000.00818.15
8.2.30.0000.00819.45
8.2.20.0040.00417.79
8.2.10.0090.00017.90
8.2.00.0080.00017.88
8.1.280.0100.00725.92
8.1.270.0030.00623.99
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0060.00322.45
8.1.230.0070.00421.11
8.1.220.0030.00618.77
8.1.210.0030.00618.89
8.1.200.0060.00317.47
8.1.190.0040.00417.41
8.1.180.0030.00518.10
8.1.170.0000.00818.59
8.1.160.0080.00018.91
8.1.150.0000.00818.64
8.1.140.0040.00417.36
8.1.130.0040.00417.86
8.1.120.0000.00817.50
8.1.110.0000.00717.48
8.1.100.0000.00817.53
8.1.90.0040.00417.48
8.1.80.0000.00717.52
8.1.70.0030.00317.40
8.1.60.0030.00617.61
8.1.50.0030.00617.46
8.1.40.0040.00417.50
8.1.30.0000.00717.59
8.1.20.0000.00817.67
8.1.10.0080.00017.52
8.1.00.0040.00417.53
8.0.300.0050.00319.89
8.0.290.0000.00717.04
8.0.280.0000.00718.47
8.0.270.0070.00017.27
8.0.260.0050.00316.90
8.0.250.0030.00617.04
8.0.240.0000.00816.88
8.0.230.0000.00716.92
8.0.220.0040.00417.01
8.0.210.0050.00316.87
8.0.200.0000.00616.90
8.0.190.0030.00517.03
8.0.180.0040.00416.88
8.0.170.0040.00416.92
8.0.160.0000.00816.92
8.0.150.0000.00716.96
8.0.140.0040.00416.86
8.0.130.0000.00613.28
8.0.120.0000.00716.95
8.0.110.0070.00016.83
8.0.100.0050.00316.82
8.0.90.0000.00716.96
8.0.80.0080.00816.92
8.0.70.0040.00417.02
8.0.60.0000.00816.93
8.0.50.0050.00316.82
8.0.30.0140.00517.12
8.0.20.0230.00917.40
8.0.10.0000.00716.95
8.0.00.0100.01216.94
7.4.330.0000.00516.71
7.4.320.0060.00016.63
7.4.300.0000.00616.60
7.4.290.0030.00316.50
7.4.280.0060.00316.59
7.4.270.0070.00016.66
7.4.260.0030.00313.31
7.4.250.0050.00316.34
7.4.240.0040.00416.61
7.4.230.0000.00716.52
7.4.220.0060.01616.51
7.4.210.0060.00916.55
7.4.200.0040.00416.40
7.4.190.0080.00016.58
7.4.160.0110.00616.58
7.4.150.0100.01317.40
7.4.140.0110.00817.86
7.4.130.0120.00616.60
7.4.120.0030.01316.46
7.4.110.0070.01116.36
7.4.100.0120.00516.57
7.4.90.0090.00916.61
7.4.80.0100.01019.39
7.4.70.0030.01316.64
7.4.60.0140.00316.49
7.4.50.0030.00316.58
7.4.40.0060.00622.77
7.4.30.0090.01016.26
7.4.00.0080.00914.93
7.3.330.0000.00513.30
7.3.320.0050.00013.27
7.3.310.0040.00416.27
7.3.300.0030.00316.45
7.3.290.0030.01216.46
7.3.280.0070.00816.42
7.3.270.0140.00617.40
7.3.260.0120.01218.24
7.3.250.0060.01416.52
7.3.240.0060.00916.37
7.3.230.0100.00716.66
7.3.210.0090.00916.39
7.3.200.0060.01619.39
7.3.190.0080.00816.72
7.3.180.0070.01016.54
7.3.170.0090.00916.48
7.3.160.0100.01016.41
7.3.120.0060.01214.91
7.3.110.0080.00814.96
7.3.100.0080.00714.81
7.3.90.0070.00714.89
7.3.80.0070.00514.82
7.3.70.0080.00714.78
7.3.60.0070.00714.79
7.3.50.0070.00614.96
7.3.40.0030.01014.85
7.3.30.0050.00614.68
7.3.20.0050.01116.68
7.3.10.0070.00716.67
7.3.00.0060.00816.78
7.2.330.0030.01316.36
7.2.320.0060.01216.41
7.2.310.0000.02316.38
7.2.300.0070.01016.50
7.2.290.0060.01216.88
7.2.250.0050.01314.97
7.2.240.0080.01015.05
7.2.230.0040.01214.88
7.2.220.0040.01015.10
7.2.210.0050.00914.94
7.2.200.0040.00815.04
7.2.190.0040.00715.16
7.2.180.0100.00414.99
7.2.170.0030.01115.01
7.2.60.0100.00416.93
7.2.00.0060.00619.24
7.1.330.0050.01015.77
7.1.320.0080.00515.77
7.1.310.0060.00915.83
7.1.300.0030.01115.62
7.1.290.0080.00615.58
7.1.280.0050.00815.76
7.1.270.0040.00915.71
7.1.260.0030.01015.65
7.1.200.0060.00615.51
7.1.100.0100.00518.18
7.1.70.0100.00016.90
7.1.60.0070.01819.17
7.1.50.0110.01416.68
7.1.00.0030.06322.42
7.0.200.0030.00716.54
7.0.140.0130.06022.00
7.0.100.0100.07719.96
7.0.90.0170.05019.94
7.0.80.0130.06319.95
7.0.70.0070.08320.04
7.0.60.0130.06720.09
7.0.50.0100.07320.40
7.0.40.0070.08320.00
7.0.30.0000.06020.03
7.0.20.0130.07320.11
7.0.10.0130.07720.00
7.0.00.0100.06720.18
5.6.280.0070.07021.15
5.6.250.0100.04320.82
5.6.240.0130.07020.61
5.6.230.0100.05720.63
5.6.220.0070.05020.50
5.6.210.0070.04720.65
5.6.200.0130.05321.09
5.6.190.0030.04321.03
5.6.180.0100.04320.95
5.6.170.0130.04320.98
5.6.160.0130.07021.02
5.6.150.0030.08321.01
5.6.140.0130.07721.09
5.6.130.0070.07320.93
5.6.120.0070.07320.97
5.6.110.0070.06321.04
5.6.100.0100.07021.07
5.6.90.0100.04720.98
5.6.80.0000.06720.31
5.6.70.0100.07720.34
5.6.60.0030.09020.51
5.6.50.0100.07020.39
5.6.40.0100.08020.45
5.6.30.0070.07720.32
5.6.20.0130.08020.40
5.6.10.0070.08020.43
5.6.00.0100.07720.28
5.5.380.0070.06020.43
5.5.370.0030.08720.38
5.5.360.0130.08020.37
5.5.350.0030.07020.43
5.5.340.0000.09020.89
5.5.330.0030.04320.75
5.5.320.0070.08320.91
5.5.310.0070.08020.84
5.5.300.0070.08020.93
5.5.290.0170.08020.84
5.5.280.0100.05720.78
5.5.270.0070.08320.88
5.5.260.0100.08720.63
5.5.250.0130.07720.75
5.5.240.0130.07320.21
5.5.230.0070.08020.09
5.5.220.0100.07320.29
5.5.210.0100.08020.23
5.5.200.0030.08320.24
5.5.190.0070.08720.29
5.5.180.0030.08320.00
5.5.160.0100.08020.22
5.5.150.0070.07020.20
5.5.140.0000.08320.24
5.5.130.0170.06720.29
5.5.120.0070.07720.23
5.5.110.0130.04020.27
5.5.100.0070.08020.16
5.5.90.0070.06720.09
5.5.80.0070.08020.15
5.5.70.0030.06720.11
5.5.60.0000.05019.94
5.5.50.0030.04020.06
5.5.40.0000.04320.13
5.5.30.0170.03320.09
5.5.20.0030.04720.07
5.5.10.0100.03319.98
5.5.00.0000.05319.97
5.4.450.0030.08019.35
5.4.440.0170.06319.36
5.4.430.0100.07719.53
5.4.420.0070.07719.21
5.4.410.0130.07019.36
5.4.400.0100.07319.14
5.4.390.0030.07019.03
5.4.380.0100.06319.00
5.4.370.0100.04718.92
5.4.360.0130.07019.16
5.4.350.0170.07319.23
5.4.340.0170.07019.05
5.4.320.0130.07719.09
5.4.310.0130.04318.95
5.4.300.0070.07318.90
5.4.290.0030.07319.16
5.4.280.0100.05719.05
5.4.270.0070.08019.04
5.4.260.0100.07719.05
5.4.250.0070.07019.23
5.4.240.0100.07319.16
5.4.230.0100.07019.12
5.4.220.0000.06719.04
5.4.210.0100.03319.11
5.4.200.0030.04019.20
5.4.190.0070.03719.03
5.4.180.0070.03718.88
5.4.170.0130.02718.86
5.4.160.0030.04019.14
5.4.150.0030.05718.85
5.4.140.0030.03316.20
5.4.130.0070.04016.40
5.4.120.0030.03016.27
5.4.110.0030.03716.47
5.4.100.0000.05316.48
5.4.90.0070.05016.32
5.4.80.0000.05316.42
5.4.70.0070.05016.49
5.4.60.0070.02716.41
5.4.50.0070.04316.43
5.4.40.0070.07316.52
5.4.30.0000.07716.29
5.4.20.0000.04316.32
5.4.10.0030.05016.44
5.4.00.0000.03315.86
5.3.290.0070.07014.79
5.3.280.0030.06014.66
5.3.270.0000.04314.56
5.3.260.0000.04714.64
5.3.250.0000.04014.75
5.3.240.0000.04314.54
5.3.230.0000.04714.72
5.3.220.0030.07314.50
5.3.210.0000.05014.53
5.3.200.0030.03314.59
5.3.190.0070.03314.63
5.3.180.0030.06014.69
5.3.170.0030.06314.55
5.3.160.0070.06714.63
5.3.150.0070.06014.71
5.3.140.0030.07714.62
5.3.130.0030.04014.69
5.3.120.0030.03314.55
5.3.110.0070.03014.48
5.3.100.0030.03314.04
5.3.90.0100.03014.04
5.3.80.0070.03313.93
5.3.70.0000.04014.09
5.3.60.0000.04013.93
5.3.50.0000.04014.07
5.3.40.0030.05714.07
5.3.30.0030.03713.97
5.3.20.0000.03713.76
5.3.10.0030.06013.68
5.3.00.0030.03313.55
5.2.170.0030.02711.16
5.2.160.0000.03011.20
5.2.150.0030.02711.24
5.2.140.0030.02711.14
5.2.130.0070.05011.17
5.2.120.0030.02711.09
5.2.110.0100.02311.20
5.2.100.0070.02711.11
5.2.90.0000.03011.01
5.2.80.0000.03311.23
5.2.70.0030.03011.01
5.2.60.0070.02311.12
5.2.50.0030.06710.91
5.2.40.0000.03311.14
5.2.30.0030.03310.87
5.2.20.0030.05010.98
5.2.10.0030.02710.93
5.2.00.0000.05710.72
5.1.60.0030.0239.84
5.1.50.0030.0239.98
5.1.40.0070.0179.98
5.1.30.0030.02310.40
5.1.20.0070.02010.46
5.1.10.0030.02310.11
5.1.00.0000.02310.13
5.0.50.0030.0209.69
5.0.40.0000.0179.69
5.0.30.0000.0409.69
5.0.20.0000.0339.69
5.0.10.0030.0339.69
5.0.00.0070.0639.69
4.4.90.0030.0309.69
4.4.80.0030.0239.69
4.4.70.0030.0139.69
4.4.60.0000.0179.69
4.4.50.0030.0139.69
4.4.40.0000.0279.69
4.4.30.0000.0179.69
4.4.20.0030.0139.69
4.4.10.0000.0179.69
4.4.00.0000.0279.69
4.3.110.0000.0179.69
4.3.100.0030.0139.69
4.3.90.0030.0139.69
4.3.80.0000.0579.69
4.3.70.0000.0439.69
4.3.60.0000.0379.69
4.3.50.0000.0339.69
4.3.40.0000.0339.69
4.3.30.0000.0379.69
4.3.20.0000.0379.69
4.3.10.0000.0379.69
4.3.00.0000.0379.69

preferences:
41.67 ms | 401 KiB | 5 Q