3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Sorter { public static function sort($a, $b) { return $a - $b; } } spl_autoload_register(function($class) { echo "autoloading {$class}\n"; eval("class $class extends Sorter { }"); }); $array = array(3, 1, 4, 1, 5, 9, 2, 6, 5, 4); usort($array, array("Foo", "sort")); print_r($array);

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.0090.00616.50
8.3.60.0090.01118.30
8.3.50.0090.00921.93
8.3.40.0080.00818.84
8.3.30.0110.00319.07
8.3.20.0040.00420.18
8.3.10.0090.00023.61
8.3.00.0040.00419.38
8.2.180.0100.01016.75
8.2.170.0090.00622.96
8.2.160.0140.00020.35
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0050.00322.20
8.2.110.0040.00422.11
8.2.100.0080.00317.75
8.2.90.0050.00319.26
8.2.80.0000.00917.97
8.2.70.0030.00517.63
8.2.60.0000.00818.04
8.2.50.0030.00618.07
8.2.40.0000.00818.22
8.2.30.0000.00718.17
8.2.20.0040.00417.76
8.2.10.0040.00418.12
8.2.00.0040.00417.60
8.1.280.0190.00025.92
8.1.270.0060.00323.84
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00024.05
8.1.230.0090.00319.10
8.1.220.0030.00517.79
8.1.210.0040.00418.77
8.1.200.0130.00417.00
8.1.190.0050.00317.35
8.1.180.0000.00818.10
8.1.170.0040.00420.37
8.1.160.0040.00422.03
8.1.150.0040.00418.89
8.1.140.0040.00417.48
8.1.130.0030.00317.70
8.1.120.0070.00017.43
8.1.110.0000.00717.50
8.1.100.0000.00717.51
8.1.90.0050.00317.45
8.1.80.0050.00317.54
8.1.70.0030.00317.35
8.1.60.0000.00817.62
8.1.50.0000.00817.43
8.1.40.0040.00417.58
8.1.30.0000.00817.65
8.1.20.0040.00417.49
8.1.10.0090.00017.68
8.1.00.0040.00417.53
8.0.300.0000.00718.77
8.0.290.0040.00416.63
8.0.280.0050.00318.46
8.0.270.0040.00417.24
8.0.260.0060.00017.32
8.0.250.0080.00017.03
8.0.240.0000.00817.01
8.0.230.0070.00016.96
8.0.220.0030.00316.97
8.0.210.0000.00717.00
8.0.200.0040.00416.86
8.0.190.0040.00416.92
8.0.180.0050.00316.93
8.0.170.0040.00416.93
8.0.160.0030.00316.74
8.0.150.0030.00316.91
8.0.140.0050.00516.89
8.0.130.0050.00013.37
8.0.120.0040.00416.75
8.0.110.0030.00316.91
8.0.100.0040.00416.78
8.0.90.0040.00416.78
8.0.80.0090.00616.89
8.0.70.0030.00516.79
8.0.60.0080.00016.81
8.0.50.0000.00716.75
8.0.30.0130.00717.09
8.0.20.0160.00217.40
8.0.10.0000.00817.06
8.0.00.0090.01216.72
7.4.330.0050.00015.05
7.4.320.0000.00716.49
7.4.300.0030.00316.49
7.4.290.0050.00316.46
7.4.280.0050.00216.50
7.4.270.0000.00716.60
7.4.260.0030.00316.50
7.4.250.0000.00816.46
7.4.240.0050.00216.52
7.4.230.0030.00316.68
7.4.220.0100.01016.56
7.4.210.0100.01016.59
7.4.200.0000.00716.54
7.4.160.0040.01116.51
7.4.150.0120.00617.40
7.4.140.0130.01117.86
7.4.130.0080.01116.47
7.4.120.0090.00716.60
7.4.110.0080.00816.62
7.4.100.0100.00616.49
7.4.90.0100.00716.46
7.4.80.0070.01119.39
7.4.70.0120.00916.42
7.4.60.0080.00816.40
7.4.50.0000.00416.34
7.4.40.0150.00316.50
7.4.30.0160.00016.54
7.4.00.0040.01114.92
7.3.330.0060.00013.38
7.3.320.0020.00313.32
7.3.310.0000.00616.36
7.3.300.0030.00316.26
7.3.290.0080.00616.34
7.3.280.0080.00816.37
7.3.270.0030.01617.40
7.3.260.0090.01616.36
7.3.250.0120.00616.44
7.3.240.0100.00716.65
7.3.230.0160.00816.61
7.3.210.0040.01416.28
7.3.200.0070.01016.50
7.3.190.0090.01016.53
7.3.180.0030.01316.46
7.3.170.0080.01216.37
7.3.160.0090.01216.48
7.2.330.0060.01016.45
7.2.320.0040.01816.79
7.2.310.0110.00616.71
7.2.300.0060.01016.58
7.2.290.0060.01216.63
7.2.60.0150.00816.86
7.1.200.0030.00615.84
7.1.70.0000.00917.14
7.1.60.0040.02219.32
7.1.50.0150.00916.92
7.1.00.0030.07722.44
7.0.200.0000.00816.81
7.0.140.0030.07021.92
7.0.60.0100.05720.01
7.0.50.0030.04017.91
7.0.40.0030.08319.96
7.0.30.0400.06020.08
7.0.20.0170.04720.19
7.0.10.0000.04720.30
7.0.00.0070.05020.08
5.6.280.0070.07021.16
5.6.210.0130.08720.73
5.6.200.0030.04018.24
5.6.190.0130.04720.61
5.6.180.0170.06720.52
5.6.170.0300.07720.56
5.6.160.0100.08320.54
5.6.150.0100.06718.30
5.6.140.0130.06018.20
5.6.130.0030.09018.11
5.6.120.0030.04020.90
5.6.110.0000.08321.14
5.6.100.0070.09021.14
5.6.90.0200.06720.97
5.6.80.0100.03320.28
5.6.70.4470.03720.28
5.5.350.0300.06020.46
5.5.340.0030.06017.99
5.5.330.0030.04320.57
5.5.320.0270.05720.38
5.5.310.0270.07320.20
5.5.300.0130.07317.95
5.5.290.0000.04318.02
5.5.280.0030.04020.73
5.5.270.0070.08320.75
5.5.260.0130.06320.77
5.5.250.0070.06020.61
5.5.240.4000.04320.36
5.4.450.0970.06719.61
5.4.440.0800.05719.58
5.4.430.0930.05319.55
5.4.420.0170.04719.33
5.4.410.0970.05019.18
5.4.400.0830.05319.15
5.4.390.0300.04719.01
5.4.380.0900.05719.20
5.4.370.0830.04718.98
5.4.360.0630.08019.14
5.4.350.0730.05019.26
5.4.340.0040.03712.02
5.4.320.0080.03812.51
5.4.310.0070.03812.50
5.4.300.0110.03412.51
5.4.290.0060.04212.50
5.4.280.0070.03512.40
5.4.270.0070.03512.39
5.4.260.0060.03612.40
5.4.250.0060.03712.40
5.4.240.0070.03612.39
5.4.230.0030.04212.39
5.4.220.0060.04112.39
5.4.210.0050.03512.39
5.4.200.0070.03712.39
5.4.190.0080.03512.39
5.4.180.0010.04112.39
5.4.170.0020.04012.39
5.4.160.0050.03612.39
5.4.150.0060.03712.39
5.4.140.0070.03612.07
5.4.130.0080.03212.06
5.4.120.0030.03812.02
5.4.110.0050.03612.02
5.4.100.0040.03712.02
5.4.90.0080.03512.02
5.4.80.0070.03512.02
5.4.70.0080.03312.01
5.4.60.0080.03612.01
5.4.50.0030.03912.01
5.4.40.0070.03412.00
5.4.30.0050.04111.99
5.4.20.0040.03912.00
5.4.10.0070.03311.99
5.4.00.0030.03911.49
5.3.290.0070.03812.80
5.3.280.0040.04412.71
5.3.270.0100.03712.72
5.3.260.0080.03712.72
5.3.250.0060.03712.72
5.3.240.0070.03712.72
5.3.230.0070.03812.71
5.3.220.0060.03912.68
5.3.210.0020.04412.68
5.3.200.0070.03512.68
5.3.190.0040.04012.68
5.3.180.0070.03512.67
5.3.170.0070.03512.67
5.3.160.0050.03712.68
5.3.150.0070.03712.67
5.3.140.0070.03512.66
5.3.130.0050.04012.66
5.3.120.0040.04012.66
5.3.110.0080.03712.66
5.3.100.0080.03512.13
5.3.90.0080.03712.11
5.3.80.0070.03512.09
5.3.70.0060.03612.09
5.3.60.0050.04212.08
5.3.50.0070.03512.03
5.3.40.0060.03712.03
5.3.30.0050.03811.99
5.3.20.0070.03411.77
5.3.10.0080.03311.73
5.3.00.0040.03811.72
5.2.170.0050.0309.22
5.2.160.0050.0289.22
5.2.150.0050.0309.22
5.2.140.0100.0259.21
5.2.130.0040.0319.18
5.2.120.0040.0309.18
5.2.110.0090.0389.18
5.2.100.0050.0379.18
5.2.90.0030.0349.18
5.2.80.0060.0299.17
5.2.70.0100.0299.18
5.2.60.0010.0339.13
5.2.50.0030.0329.09
5.2.40.0030.0319.07
5.2.30.0070.0329.04
5.2.20.0020.0349.04
5.2.10.0070.0368.95
5.2.00.0070.0298.81
5.1.60.0040.0248.09
5.1.50.0040.0258.09
5.1.40.0070.0228.06
5.1.30.0040.0268.42
5.1.20.0040.0278.44
5.1.10.0030.0278.17
5.1.00.0060.0248.16
5.0.50.0060.0206.64
5.0.40.0050.0216.50
5.0.30.0040.0376.32
5.0.20.0050.0196.28
5.0.10.0020.0216.26
5.0.00.0020.0316.25
4.4.90.0020.0164.78
4.4.80.0020.0164.75
4.4.70.0030.0214.76
4.4.60.0030.0154.75
4.4.50.0040.0144.77
4.4.40.0020.0264.71
4.4.30.0030.0174.76
4.4.20.0010.0164.85
4.4.10.0050.0174.84
4.4.00.0070.0244.76
4.3.110.0010.0174.67
4.3.100.0030.0144.67
4.3.90.0020.0154.63
4.3.80.0030.0244.58
4.3.70.0040.0134.63
4.3.60.0050.0124.63
4.3.50.0030.0154.63
4.3.40.0030.0244.54
4.3.30.0050.0133.30
4.3.20.0020.0163.28
4.3.10.0010.0193.23
4.3.00.0130.0236.71

preferences:
47.97 ms | 401 KiB | 5 Q