3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Person { public $sname; public $fname; public $age; public function __construct($a,$b,$c) { $this->sname = $a; $this->fname = $b; $this->age = $c; return $this; } } $horrible_array_of_stuff = array( new Person("Owen", "Dyckhoff", 27), new Person("Joe", "Bloggs", 36 ) ); print_r($horrible_array_of_stuff); echo "\nSorting Array of Objects\n\n"; usort( $horrible_array_of_stuff, function( $left, $right ) { return [$left->sname, $left->fname, $left->age] <=> [$right->sname, $right->fname, $right->age]; } ); print_r($horrible_array_of_stuff);

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.01118.30
8.3.50.0130.00722.02
8.3.40.0100.01018.84
8.3.30.0110.00318.58
8.3.20.0070.00020.38
8.3.10.0080.00023.74
8.3.00.0080.00019.80
8.2.180.0120.00616.50
8.2.170.0140.00022.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0060.00321.05
8.2.120.0000.00826.35
8.2.110.0030.00719.32
8.2.100.0090.00317.84
8.2.90.0000.00817.91
8.2.80.0060.00317.97
8.2.70.0030.00617.50
8.2.60.0080.00017.80
8.2.50.0000.00818.07
8.2.40.0040.00422.00
8.2.30.0030.00520.52
8.2.20.0000.00817.75
8.2.10.0050.00218.08
8.2.00.0000.00718.06
8.1.280.0120.00425.92
8.1.270.0070.01320.20
8.1.260.0000.00928.09
8.1.250.0080.00028.09
8.1.240.0050.00523.73
8.1.230.0110.00020.89
8.1.220.0000.00817.74
8.1.210.0080.00018.89
8.1.200.0050.00517.38
8.1.190.0030.00517.38
8.1.180.0030.00618.10
8.1.170.0040.00418.37
8.1.160.0030.00320.77
8.1.150.0030.00518.94
8.1.140.0040.00419.47
8.1.130.0000.00717.76
8.1.120.0040.00417.53
8.1.110.0030.00617.46
8.1.100.0040.00417.43
8.1.90.0050.00317.40
8.1.80.0030.00617.46
8.1.70.0030.00317.45
8.1.60.0060.00317.63
8.1.50.0040.00417.45
8.1.40.0040.00417.52
8.1.30.0040.00417.52
8.1.20.0020.00517.73
8.1.10.0080.00017.55
8.1.00.0110.00017.56
8.0.300.0000.00719.98
8.0.290.0040.00416.75
8.0.280.0070.00018.46
8.0.270.0000.00717.18
8.0.260.0070.00317.27
8.0.250.0070.00016.93
8.0.240.0030.00316.93
8.0.230.0070.00016.96
8.0.220.0000.00716.78
8.0.210.0000.00716.88
8.0.200.0000.00616.93
8.0.190.0040.00416.86
8.0.180.0000.00716.91
8.0.170.0050.00216.95
8.0.160.0040.00416.81
8.0.150.0050.00216.80
8.0.140.0030.00316.77
8.0.130.0000.00613.39
8.0.120.0000.00816.90
8.0.110.0030.00516.79
8.0.100.0070.00016.77
8.0.90.0040.00416.95
8.0.80.0060.00916.89
8.0.70.0040.00416.99
8.0.60.0040.00416.96
8.0.50.0070.00016.71
8.0.30.0090.00817.04
8.0.20.0100.00817.40
8.0.10.0040.00317.05
8.0.00.0110.00616.69
7.4.330.0030.00316.71
7.4.320.0060.00016.51
7.4.300.0000.00616.37
7.4.290.0100.00016.51
7.4.280.0030.00616.60
7.4.270.0030.00316.48
7.4.260.0000.00716.41
7.4.250.0040.00416.41
7.4.240.0020.00516.58
7.4.230.0030.00316.71
7.4.220.0100.01016.68
7.4.210.0000.01616.59
7.4.200.0000.00716.65
7.4.160.0060.00916.56
7.4.150.0070.01117.40
7.4.140.0100.01217.86
7.4.130.0090.00916.54
7.4.120.0120.00516.48
7.4.110.0090.00916.63
7.4.100.0120.00916.49
7.4.90.0120.01216.68
7.4.80.0070.01619.39
7.4.70.0080.00816.50
7.4.60.0090.00616.54
7.4.50.0110.00416.52
7.4.40.0030.01416.38
7.4.30.0090.01216.56
7.4.00.0100.00614.98
7.3.330.0030.00313.32
7.3.320.0030.00313.18
7.3.310.0030.00316.35
7.3.300.0030.00316.36
7.3.290.0090.00516.30
7.3.280.0080.00716.32
7.3.270.0000.01717.40
7.3.260.0100.00716.55
7.3.240.0110.00716.45
7.3.230.0100.00716.50
7.3.210.0110.00916.56
7.3.200.0110.00616.63
7.3.190.0130.00416.60
7.3.180.0120.00616.61
7.3.170.0080.00816.56
7.3.160.0060.01116.43
7.3.120.0160.00314.79
7.3.110.0090.00914.82
7.3.100.0060.00614.52
7.3.90.0100.00714.81
7.3.80.0090.00614.98
7.3.70.0100.00314.92
7.3.60.0000.01414.71
7.3.50.0100.00314.75
7.3.40.0090.00914.84
7.3.30.0030.01014.44
7.3.20.0030.01016.68
7.3.10.0070.00516.26
7.3.00.0090.00316.67
7.2.330.0120.00616.47
7.2.320.0030.01516.82
7.2.310.0070.01016.82
7.2.300.0090.00816.77
7.2.290.0040.01216.82
7.2.240.0060.01015.25
7.2.230.0120.00615.21
7.2.220.0060.00615.26
7.2.210.0090.00615.11
7.2.200.0070.00714.84
7.2.190.0030.01015.20
7.2.180.0040.00815.33
7.2.170.0070.00715.04
7.2.160.0030.01015.26
7.2.150.0070.00716.92
7.2.140.0030.00716.93
7.2.130.0090.00816.89
7.2.120.0070.00916.86
7.2.110.0090.00516.54
7.2.100.0100.00616.97
7.2.90.0090.00916.79
7.2.80.0060.00816.84
7.2.70.0150.00716.56
7.2.60.0060.01116.90
7.2.50.0140.00916.67
7.2.40.0160.00716.75
7.2.30.0070.01216.91
7.2.20.0110.00716.78
7.2.10.0110.00316.87
7.2.00.0070.00917.82
7.1.330.0070.01115.88
7.1.320.0090.00915.79
7.1.310.0060.00615.63
7.1.300.0030.00615.56
7.1.290.0110.00415.65
7.1.280.0120.00615.66
7.1.270.0030.00815.95
7.1.260.0070.00715.79
7.1.250.0050.00815.95
7.1.200.0090.00615.87
7.1.100.0030.01317.78
7.1.70.0000.00817.09
7.1.60.0110.01119.05
7.1.50.0070.00717.07
7.1.00.0030.07322.33
7.0.200.0180.00314.68
7.0.60.0100.08019.96
7.0.50.0030.04317.90
7.0.40.0070.07720.23
7.0.30.0300.03320.21
7.0.20.0400.06720.21
7.0.10.0070.06320.23
7.0.00.0000.04720.12
5.6.280.0000.03720.93
5.6.210.0100.06320.52
5.6.200.0000.08318.29
5.6.190.0100.08020.55
5.6.180.0170.05720.63
5.6.170.0230.08320.45
5.6.160.0030.04020.45
5.6.150.0100.05018.23
5.6.140.0030.04718.20
5.6.130.0030.04018.21
5.6.120.0100.03321.02
5.6.110.0070.08021.10
5.6.100.0100.05021.05
5.6.90.0000.04320.96
5.6.80.0030.08020.46
5.5.350.0130.04020.41
5.5.340.0070.04718.00
5.5.330.0130.07320.57
5.5.320.0170.04020.32
5.5.310.0330.07020.24
5.5.300.0030.08018.08
5.5.290.0070.04317.98
5.5.280.0200.07020.90
5.5.270.0070.09020.88
5.5.260.0000.04320.77
5.5.250.0070.09020.71
5.5.240.0200.04020.28

preferences:
63.67 ms | 401 KiB | 5 Q