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->fname = $a; $this->sname = $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 "Sorting Array of Objects\n"; usort( $horrible_array_of_stuff, function( $left, $right ) { return [$left->fname, $left->sname, $left->age] <=> [$right->fname, $right->sname, $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.0130.01016.75
8.3.50.0240.01222.10
8.3.40.0120.00918.68
8.3.30.0110.00418.87
8.3.20.0070.00020.25
8.3.10.0060.00923.48
8.3.00.0080.00019.97
8.2.180.0070.01018.54
8.2.170.0090.00922.96
8.2.160.0170.00320.38
8.2.150.0090.00924.18
8.2.140.0120.00624.66
8.2.130.0030.00617.63
8.2.120.0120.00326.35
8.2.110.0030.00620.94
8.2.100.0080.00417.88
8.2.90.0060.00319.17
8.2.80.0000.00917.97
8.2.70.0030.00617.49
8.2.60.0050.00517.89
8.2.50.0000.00818.07
8.2.40.0050.00322.37
8.2.30.0000.00720.57
8.2.20.0050.00317.62
8.2.10.0070.00018.14
8.2.00.0060.00318.13
8.1.280.0030.01025.92
8.1.270.0050.00320.32
8.1.260.0000.00728.09
8.1.250.0000.00828.09
8.1.240.0040.00423.81
8.1.230.0000.01318.86
8.1.220.0090.00017.74
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0000.00817.35
8.1.180.0000.00718.10
8.1.170.0090.00018.72
8.1.160.0040.00420.69
8.1.150.0070.00019.00
8.1.140.0030.00619.66
8.1.130.0040.00417.74
8.1.120.0000.00817.43
8.1.110.0070.00017.41
8.1.100.0030.00617.50
8.1.90.0000.00717.38
8.1.80.0080.00017.45
8.1.70.0070.00017.43
8.1.60.0030.00517.62
8.1.50.0000.00817.53
8.1.40.0000.00817.52
8.1.30.0060.00317.68
8.1.20.0040.00417.64
8.1.10.0080.00017.59
8.1.00.0030.00517.53
8.0.300.0080.00018.77
8.0.290.0000.00716.75
8.0.280.0030.00318.50
8.0.270.0000.00717.22
8.0.260.0000.00617.14
8.0.250.0000.00716.98
8.0.240.0040.00416.85
8.0.230.0040.00417.03
8.0.220.0050.00316.92
8.0.210.0040.00416.95
8.0.200.0070.00016.87
8.0.190.0080.00016.90
8.0.180.0040.00416.99
8.0.170.0030.00516.93
8.0.160.0040.00416.93
8.0.150.0040.00416.82
8.0.140.0000.00716.86
8.0.130.0060.00013.28
8.0.120.0080.00016.86
8.0.110.0040.00416.83
8.0.100.0000.00716.78
8.0.90.0030.00316.77
8.0.80.0090.00616.86
8.0.70.0040.00416.85
8.0.60.0000.00716.97
8.0.50.0060.00316.96
8.0.30.0060.01417.12
8.0.20.0110.01117.40
8.0.10.0000.00716.91
8.0.00.0110.00716.70
7.4.330.0050.00016.69
7.4.320.0040.00416.50
7.4.300.0030.00316.64
7.4.290.0030.00316.65
7.4.280.0000.00716.61
7.4.270.0000.00716.41
7.4.260.0000.00816.58
7.4.250.0030.00316.55
7.4.240.0060.00116.57
7.4.230.0030.00316.45
7.4.220.0150.00316.61
7.4.210.0070.00716.62
7.4.200.0030.00316.50
7.4.160.0090.00616.45
7.4.150.0130.00817.40
7.4.140.0110.01117.86
7.4.130.0110.00816.49
7.4.120.0140.00516.54
7.4.110.0090.00916.50
7.4.100.0070.01116.41
7.4.90.0060.01616.66
7.4.80.0220.00019.39
7.4.70.0160.00616.44
7.4.60.0080.00816.48
7.4.50.0000.01516.35
7.4.40.0050.01216.35
7.4.30.0150.00316.46
7.4.00.0100.00314.87
7.3.330.0040.00413.16
7.3.320.0050.00013.33
7.3.310.0030.00316.17
7.3.300.0030.00316.27
7.3.290.0070.00016.36
7.3.280.0080.00916.30
7.3.270.0110.00717.40
7.3.260.0100.00716.41
7.3.240.0110.00616.30
7.3.230.0110.00716.41
7.3.210.0080.01116.31
7.3.200.0160.00616.38
7.3.190.0120.00916.61
7.3.180.0120.00316.34
7.3.170.0110.01216.48
7.3.160.0100.00616.59
7.2.330.0080.00916.37
7.2.320.0060.01216.54
7.2.310.0090.01216.69
7.2.300.0250.02216.61
7.2.290.0060.01216.75
7.2.110.0310.00816.48
7.2.100.0290.00716.55
7.2.90.0220.00616.70
7.2.80.0150.00716.63
7.2.70.0260.00616.91
7.2.60.0110.00716.86
7.2.50.0290.00816.84
7.2.40.0180.00517.05
7.2.30.0250.00816.79
7.2.20.0140.00716.58
7.2.10.0240.01417.11
7.2.00.0110.00818.19
7.1.230.0170.00615.78
7.1.220.0190.00715.72
7.1.210.0200.00415.67
7.1.200.0120.00615.80
7.1.190.0080.01115.91
7.1.180.0150.00515.95
7.1.170.0310.01215.90
7.1.160.0090.00915.88
7.1.150.0160.00015.80
7.1.140.0150.00315.82
7.1.130.0100.00615.73
7.1.120.0300.00315.70
7.1.110.0250.00815.87
7.1.100.0050.01416.87
7.1.90.0120.01115.69
7.1.80.0220.00715.65
7.1.70.0310.00716.56
7.1.60.0100.01417.71
7.1.50.0290.01216.48
7.1.40.0170.00916.03
7.1.30.0330.00615.98
7.1.20.0510.01915.94
7.1.10.0140.00715.51
7.1.00.0050.04719.03
7.0.310.0160.00415.18
7.0.300.0180.00415.32
7.0.290.0220.01115.29
7.0.280.0140.00815.40
7.0.270.0190.01215.41
7.0.260.0050.01215.23
7.0.250.0110.00815.36
7.0.240.0030.01315.33
7.0.230.0250.00415.38
7.0.220.0170.00415.19
7.0.210.0080.01215.32
7.0.200.0320.01015.26
7.0.190.0190.00515.50
7.0.180.0120.00915.55
7.0.170.0180.00515.42
7.0.160.0210.00615.23
7.0.150.0320.00915.43
7.0.140.0200.00715.09
7.0.130.0220.00415.29
7.0.120.0170.00615.29
7.0.110.0100.01315.28
7.0.100.0110.01315.18
7.0.90.0140.00715.39
7.0.80.0170.00315.39
7.0.70.0160.00515.36
7.0.60.0080.02817.82
7.0.50.0090.02416.83
7.0.40.0130.02216.79
7.0.30.0240.03916.70
7.0.20.0170.04516.82
7.0.10.0120.03616.79
7.0.00.0070.02616.83
5.6.380.0240.00414.02
5.6.370.0070.01114.06
5.6.360.0000.01614.43
5.6.350.0090.00914.03
5.6.340.0130.00614.05
5.6.330.0130.00613.95
5.6.320.0100.01213.78
5.6.310.0180.01114.08
5.6.300.0180.00514.08
5.6.290.0140.00714.38
5.6.280.0090.01917.55
5.6.270.0120.00914.34
5.6.260.0120.00914.18
5.6.250.0190.00614.12
5.6.240.0200.00314.06
5.6.230.0150.00614.07
5.6.220.0080.01314.12
5.6.210.0080.02517.44
5.6.200.0120.04716.26
5.6.190.0160.02017.30
5.6.180.0170.04317.43
5.6.170.0240.03317.21
5.6.160.0080.02517.13
5.6.150.0070.02316.11
5.6.140.0150.03816.15
5.6.130.0090.02216.27
5.6.120.0090.03717.56
5.6.110.0110.04317.56
5.6.100.0150.03917.51
5.6.90.0180.03717.55
5.6.80.0170.04517.22
5.6.70.0270.00313.67
5.6.60.0130.01813.95
5.6.50.0250.00013.80
5.6.40.0210.01013.99
5.6.30.0220.00314.21
5.6.20.0260.00013.96
5.6.10.0220.00613.71
5.6.00.0210.00714.21
5.5.380.0080.00810.55
5.5.370.0130.00310.89
5.5.360.0100.00311.05
5.5.350.0100.03315.64
5.5.340.0120.02514.56
5.5.330.0050.04215.60
5.5.320.0310.02715.45
5.5.310.0140.03215.69
5.5.300.0050.04614.31
5.5.290.0100.03914.53
5.5.280.0090.02315.82
5.5.270.0100.02015.89
5.5.260.0030.04015.93
5.5.250.0070.04015.70
5.5.240.1740.01815.57
5.5.230.0110.00610.84
5.5.220.0140.00610.83
5.5.210.0160.00510.74
5.5.200.0130.00711.02
5.5.190.0140.00710.67
5.5.180.0140.00510.90
5.5.170.0170.01313.75
5.5.160.0150.00311.01
5.5.150.0110.00310.78
5.5.140.0120.00610.39
5.5.130.0120.00410.77
5.5.120.0100.01410.88
5.5.110.0090.00510.79
5.5.100.0140.00510.95
5.5.90.0050.00510.40
5.5.80.0180.00010.78
5.5.70.0070.00710.63
5.5.60.0160.00211.00
5.5.50.0070.00410.66
5.5.40.0120.00710.72
5.5.30.0090.00510.98
5.5.20.0140.00711.00
5.5.10.0120.00610.86
5.5.00.0200.00010.63

preferences:
55.68 ms | 401 KiB | 5 Q