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.0100.01016.50
8.3.50.0130.00821.89
8.3.40.0140.00418.78
8.3.30.0040.01118.84
8.3.20.0100.00720.16
8.3.10.0110.00323.54
8.3.00.0090.00619.77
8.2.180.0120.00625.92
8.2.170.0120.00322.96
8.2.160.0030.01020.58
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0080.00017.75
8.2.120.0000.00826.35
8.2.110.0000.00920.30
8.2.100.0040.00818.03
8.2.90.0050.00319.17
8.2.80.0050.00317.97
8.2.70.0000.00817.50
8.2.60.0030.00717.93
8.2.50.0000.00818.07
8.2.40.0060.00322.20
8.2.30.0040.00420.65
8.2.20.0060.00317.72
8.2.10.0030.00518.12
8.2.00.0040.00417.96
8.1.280.0070.00725.92
8.1.270.0080.00020.44
8.1.260.0030.00628.09
8.1.250.0040.00428.09
8.1.240.0090.00022.06
8.1.230.0000.01217.42
8.1.220.0030.00617.78
8.1.210.0000.00818.77
8.1.200.0040.00417.35
8.1.190.0000.00817.23
8.1.180.0030.00618.10
8.1.170.0040.00418.53
8.1.160.0040.00420.63
8.1.150.0070.00018.91
8.1.140.0000.00819.51
8.1.130.0050.00217.65
8.1.120.0030.00317.42
8.1.110.0040.00417.46
8.1.100.0030.00617.39
8.1.90.0040.00417.36
8.1.80.0000.00817.50
8.1.70.0080.00017.39
8.1.60.0000.00817.62
8.1.50.0040.00417.56
8.1.40.0000.00817.43
8.1.30.0030.00617.68
8.1.20.0000.00717.52
8.1.10.0030.00517.51
8.1.00.0050.00217.60
8.0.300.0050.00218.77
8.0.290.0020.00516.75
8.0.280.0030.00318.39
8.0.270.0000.00717.18
8.0.260.0000.00817.26
8.0.250.0000.00716.99
8.0.240.0000.00716.86
8.0.230.0070.00016.86
8.0.220.0000.00816.75
8.0.210.0030.00316.88
8.0.200.0030.00316.94
8.0.190.0040.00416.91
8.0.180.0030.00516.84
8.0.170.0040.00416.91
8.0.160.0080.00017.01
8.0.150.0060.00316.91
8.0.140.0080.00016.87
8.0.130.0000.00513.29
8.0.120.0000.00816.80
8.0.110.0080.00016.96
8.0.100.0020.00516.76
8.0.90.0000.00716.77
8.0.80.0150.00616.95
8.0.70.0080.00016.68
8.0.60.0050.00216.90
8.0.50.0070.00016.77
8.0.30.0120.00517.29
8.0.20.0100.01217.40
8.0.10.0050.00217.01
8.0.00.0130.00616.75
7.4.330.0000.00616.77
7.4.320.0030.00316.53
7.4.300.0060.00016.44
7.4.290.0040.00416.66
7.4.280.0030.00316.65
7.4.270.0040.00416.58
7.4.260.0000.00716.63
7.4.250.0070.00016.52
7.4.240.0010.00616.51
7.4.230.0030.00516.70
7.4.220.0120.00616.64
7.4.210.0110.00316.63
7.4.200.0000.00716.54
7.4.160.0110.00416.63
7.4.150.0060.01117.40
7.4.140.0110.01217.86
7.4.130.0070.01116.65
7.4.120.0140.00716.57
7.4.110.0140.00416.57
7.4.100.0070.01016.62
7.4.90.0170.00416.52
7.4.80.0110.01119.39
7.4.70.0160.00316.60
7.4.60.0060.00916.41
7.4.50.0030.00616.41
7.4.40.0060.01016.64
7.4.30.0160.00716.39
7.4.10.0070.01115.06
7.4.00.0120.00515.02
7.3.330.0030.00313.15
7.3.320.0030.00213.13
7.3.310.0000.00716.13
7.3.300.0030.00316.36
7.3.290.0000.00716.23
7.3.280.0110.01016.34
7.3.270.0190.00617.40
7.3.260.0060.01016.22
7.3.250.0120.00916.40
7.3.240.0090.01116.28
7.3.230.0120.00616.64
7.3.210.0030.01316.63
7.3.200.0060.01516.57
7.3.190.0060.01216.41
7.3.180.0120.00416.66
7.3.170.0060.01316.52
7.3.160.0130.00316.53
7.3.130.0050.01014.68
7.3.120.0100.00714.82
7.3.110.0070.01014.63
7.3.100.0080.00514.64
7.3.90.0020.01014.71
7.3.80.0020.01014.47
7.3.70.0090.00514.63
7.3.60.0080.00714.66
7.3.50.0050.00914.72
7.3.40.0070.00614.59
7.3.30.0060.00414.74
7.3.20.0100.00516.71
7.3.10.0050.01016.49
7.3.00.0080.00716.44
7.2.330.0060.01516.55
7.2.320.0090.01216.86
7.2.310.0060.01216.82
7.2.300.0150.00316.76
7.2.290.0110.00716.88
7.2.260.0120.00815.10
7.2.250.0100.00714.75
7.2.240.0040.01115.17
7.2.230.0030.01314.97
7.2.220.0050.01015.03
7.2.210.0070.00614.93
7.2.200.0060.00615.22
7.2.190.0090.00715.08
7.2.180.0050.00715.01
7.2.170.0060.00615.04
7.2.160.0040.01114.96
7.2.150.0030.01216.86
7.2.140.0090.00916.94
7.2.130.0030.01016.66
7.2.120.0060.00816.69
7.2.110.0060.00816.71
7.2.100.0090.00616.63
7.2.90.0060.00916.74
7.2.80.0100.00616.87
7.2.70.0050.01216.75
7.2.60.0070.00916.85
7.2.50.0110.00816.81
7.2.40.0100.00916.98
7.2.30.0120.00216.58
7.2.20.0080.01016.71
7.2.10.0080.00816.94
7.2.00.0020.01217.41
7.1.330.0050.01015.79
7.1.320.0070.00715.79
7.1.310.0100.00415.71
7.1.300.0020.01015.72
7.1.290.0080.00615.75
7.1.280.0060.00615.79
7.1.270.0090.00915.92
7.1.260.0040.01315.73
7.1.250.0060.00815.65
7.1.240.0050.01015.83
7.1.230.0060.00715.65
7.1.220.0060.00815.72
7.1.210.0060.00815.78
7.1.200.0060.00815.84
7.1.190.0090.00415.84
7.1.180.0070.00615.59
7.1.170.0020.01415.82
7.1.160.0040.00915.67
7.1.150.0020.01215.79
7.1.140.0080.00215.89
7.1.130.0080.00515.78
7.1.120.0100.00215.73
7.1.110.0030.01015.75
7.1.100.0080.00516.65
7.1.90.0040.00615.64
7.1.80.0000.01215.89
7.1.70.0040.01116.26
7.1.60.0090.00716.99
7.1.50.0080.01016.30
7.1.40.0010.01115.74
7.1.30.0020.01015.63
7.1.20.0110.00115.69
7.1.10.0060.00515.84
7.1.00.0060.02817.90
7.0.330.0080.00715.18
7.0.320.0080.00715.43
7.0.310.0050.01015.31
7.0.300.0100.00215.14
7.0.290.0060.00915.40
7.0.280.0070.00715.31
7.0.270.0070.00915.22
7.0.260.0050.00715.44
7.0.250.0080.00715.36
7.0.240.0050.00515.45
7.0.230.0090.00715.32
7.0.220.0100.00415.35
7.0.210.0010.00915.43
7.0.200.0410.00415.14
7.0.190.0040.00715.24
7.0.180.0040.00915.52
7.0.170.0030.00615.40
7.0.160.0040.00815.43
7.0.150.0050.01115.40
7.0.140.0050.00815.31
7.0.130.0110.00415.34
7.0.120.0110.00315.36
7.0.110.0080.00715.39
7.0.100.0130.00515.28
7.0.90.0030.00715.26
7.0.80.0020.01415.41
7.0.70.0080.00815.30
7.0.60.0060.02116.92
7.0.50.0050.01716.26
7.0.40.0100.01815.57
7.0.30.0130.01715.59
7.0.20.0170.02915.70
7.0.10.0130.02915.79
7.0.00.0030.01915.64
5.6.400.0080.00814.01
5.6.390.0090.00614.09
5.6.380.0070.00514.18
5.6.370.0090.00514.00
5.6.360.0020.01113.95
5.6.350.0060.00614.15
5.6.340.0050.00914.07
5.6.330.0020.01313.87
5.6.320.0060.00713.95
5.6.310.0040.00913.96
5.6.300.0080.00613.99
5.6.290.0080.00814.12
5.6.280.0100.00514.01
5.6.270.0070.00713.95
5.6.260.0050.00714.21
5.6.250.0010.00813.79
5.6.240.0080.00513.99
5.6.230.0050.00814.18
5.6.220.0040.01014.17
5.6.210.0110.02616.24
5.6.200.0080.02215.30
5.6.190.0050.02616.40
5.6.180.0110.02216.42
5.6.170.0150.03116.34
5.6.160.0010.03416.25
5.6.150.0070.02215.47
5.6.140.0070.03215.54
5.6.130.0070.01715.44
5.6.120.0080.02916.63
5.6.110.0020.03116.33
5.6.100.0020.02216.35
5.6.90.0070.02316.37
5.6.80.0090.03116.00
5.6.70.0110.00213.99
5.6.60.0030.00713.80
5.6.50.0030.00913.99
5.6.40.0060.00313.98
5.6.30.0050.00914.16
5.6.20.0030.00714.01
5.6.10.0070.00513.89
5.6.00.0100.00713.93
5.5.380.0100.00313.79
5.5.370.0020.01214.04
5.5.360.0050.01013.98
5.5.350.0070.03116.13
5.5.340.0050.03115.32
5.5.330.0050.02616.16
5.5.320.0230.03115.92
5.5.310.0110.01915.99
5.5.300.0070.02015.36
5.5.290.0030.02815.06
5.5.280.0040.03416.27
5.5.270.0020.02116.24
5.5.260.0050.02916.21
5.5.250.0050.02215.96
5.5.240.1230.01816.00
5.5.230.0020.00713.69
5.5.220.0040.00713.69
5.5.210.0040.00713.94
5.5.200.0060.00813.91
5.5.190.0040.00513.94
5.5.180.0040.00714.07
5.5.170.0050.00914.03
5.5.160.0080.00513.74
5.5.150.0110.00513.89
5.5.140.0060.00413.98
5.5.130.0030.00814.10
5.5.120.0070.00513.93
5.5.110.0040.00713.83
5.5.100.0050.00814.01
5.5.90.0060.00513.84
5.5.80.0050.00713.76
5.5.70.0050.00913.83
5.5.60.0040.01013.70
5.5.50.0050.00813.57
5.5.40.0060.00613.89
5.5.30.0070.00813.71
5.5.20.0110.00413.82
5.5.10.0070.00514.07
5.5.00.0030.01113.81

preferences:
60.19 ms | 401 KiB | 5 Q