3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Spaceship { public $name; public $maxSpeed; public function __construct($name, $maxSpeed) { $this->name = $name; $this->maxSpeed = $maxSpeed; } } $spaceships = [ new Spaceship('Rebel Transport', 20), new Spaceship('Millenium Falcon', 80), new Spaceship('X-Wing Starfighter', 80), new Spaceship('TIE Bomber', 60), new Spaceship('TIE Fighter', 100), new Spaceship('Imperial Star Destroyer', 60), ]; // Sort the spaceships by name (in ascending order) usort($spaceships, function ($ship1, $ship2) { return $ship1->name <=> $ship2->name; });

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.0140.00416.75
8.3.50.0070.00921.89
8.3.40.0070.00718.76
8.3.30.0110.00318.57
8.3.20.0050.00220.34
8.3.10.0000.00923.61
8.3.00.0080.00019.88
8.2.180.0150.00316.50
8.2.170.0110.00422.96
8.2.160.0120.00619.37
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00420.94
8.2.110.0000.00920.39
8.2.100.0070.00417.93
8.2.90.0080.00019.18
8.2.80.0030.00517.97
8.2.70.0000.00917.63
8.2.60.0050.00317.93
8.2.50.0000.00818.07
8.2.40.0030.00522.34
8.2.30.0030.00320.78
8.2.20.0050.00317.84
8.2.10.0080.00018.21
8.2.00.0040.00418.21
8.1.280.0110.00425.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0050.00522.05
8.1.230.0080.00417.66
8.1.220.0050.00317.74
8.1.210.0050.00318.77
8.1.200.0000.01017.38
8.1.190.0040.00417.35
8.1.180.0000.00718.10
8.1.170.0000.00818.67
8.1.160.0040.00420.80
8.1.150.0050.00218.93
8.1.140.0000.00819.66
8.1.130.0000.00717.68
8.1.120.0000.00717.55
8.1.110.0040.00417.54
8.1.100.0080.00017.48
8.1.90.0000.00717.46
8.1.80.0070.00017.52
8.1.70.0070.00017.50
8.1.60.0030.00517.54
8.1.50.0000.00817.56
8.1.40.0040.00417.59
8.1.30.0030.00517.63
8.1.20.0030.00617.71
8.1.10.0000.00717.55
8.1.00.0040.00417.40
8.0.300.0070.00018.77
8.0.290.0040.00416.88
8.0.280.0000.00718.46
8.0.270.0040.00417.21
8.0.260.0060.00017.30
8.0.250.0000.00717.04
8.0.240.0040.00416.90
8.0.230.0000.00716.88
8.0.220.0050.00216.94
8.0.210.0000.00716.93
8.0.200.0030.00316.98
8.0.190.0020.00516.88
8.0.180.0000.00716.85
8.0.170.0110.00016.87
8.0.160.0030.00716.90
8.0.150.0040.00416.77
8.0.140.0000.00816.78
8.0.130.0050.00013.29
8.0.120.0000.00716.86
8.0.110.0000.00716.93
8.0.100.0070.00016.84
8.0.90.0040.00416.73
8.0.80.0000.02116.89
8.0.70.0000.00716.76
8.0.60.0040.00416.96
8.0.50.0050.00316.88
8.0.30.0060.01217.06
8.0.20.0110.00817.42
8.0.10.0070.00017.11
8.0.00.0110.00716.70
7.4.330.0050.00016.76
7.4.320.0030.00316.63
7.4.300.0060.00016.39
7.4.290.0030.00316.59
7.4.280.0080.00016.70
7.4.270.0030.00316.45
7.4.260.0040.00416.48
7.4.250.0040.00416.57
7.4.240.0000.00716.54
7.4.230.0030.00316.70
7.4.220.0090.01616.48
7.4.210.0070.00716.66
7.4.200.0040.00416.72
7.4.160.0050.01516.49
7.4.150.0070.01017.40
7.4.140.0100.01217.86
7.4.130.0090.00816.48
7.4.120.0110.00616.66
7.4.110.0060.01216.54
7.4.100.0110.00616.50
7.4.90.0070.01016.48
7.4.80.0070.01419.39
7.4.70.0040.01216.32
7.4.60.0090.00616.44
7.4.50.0070.00716.57
7.4.40.0060.01216.54
7.4.30.0150.00616.66
7.4.10.0040.01414.93
7.4.00.0090.00514.86
7.3.330.0000.00513.27
7.3.320.0050.00013.25
7.3.310.0030.00316.35
7.3.300.0000.00716.33
7.3.290.0100.00916.31
7.3.280.0100.00816.31
7.3.270.0180.00017.40
7.3.260.0060.01116.36
7.3.250.0120.00616.35
7.3.240.0080.00816.33
7.3.230.0080.00816.39
7.3.210.0090.00616.24
7.3.200.0060.00916.20
7.3.190.0080.00816.47
7.3.180.0040.01216.38
7.3.170.0070.01416.38
7.3.160.0070.01016.50
7.3.130.0060.01315.03
7.3.120.0090.00914.86
7.3.110.0060.01314.53
7.3.100.0000.01514.82
7.3.90.0060.00914.69
7.3.80.0080.00414.96
7.3.70.0100.00314.87
7.3.60.0080.00614.79
7.3.50.0040.00414.50
7.3.40.0030.01014.70
7.3.30.0040.00414.74
7.3.20.0050.00516.57
7.3.10.0060.01016.79
7.3.00.0000.01416.63
7.2.330.0110.00816.72
7.2.320.0030.01316.54
7.2.310.0120.00416.68
7.2.300.0030.01416.73
7.2.290.0070.01016.52
7.2.260.0060.01314.76
7.2.250.0140.00615.23
7.2.240.0030.01214.79
7.2.230.0000.01515.00
7.2.220.0130.00615.24
7.2.210.0080.00814.79
7.2.200.0110.00014.87
7.2.190.0040.00814.89
7.2.180.0000.00915.16
7.2.170.0000.00914.94
7.2.160.0030.00914.88
7.2.150.0030.01016.93
7.2.140.0070.00316.92
7.2.130.0060.00616.84
7.2.120.0060.00316.98
7.2.110.0000.01316.61
7.2.100.0100.00316.98
7.2.90.0030.01416.88
7.2.80.0060.00916.82
7.2.70.0030.00716.73
7.2.60.0190.00816.72
7.2.50.0030.01016.79
7.2.40.0100.01016.87
7.2.30.0030.01017.00
7.2.20.0120.00616.95
7.2.10.0070.01416.60
7.2.00.0030.01018.16
7.1.330.0060.00615.50
7.1.320.0070.00715.97
7.1.310.0030.01015.91
7.1.300.0000.01315.82
7.1.290.0040.00715.46
7.1.280.0090.00615.54
7.1.270.0060.00615.79
7.1.260.0090.00615.78
7.1.250.0060.00615.63
7.1.240.0080.00815.59
7.1.230.0070.00715.67
7.1.220.0040.00815.58
7.1.210.0090.00615.54
7.1.200.0060.00815.58
7.1.190.0030.01015.71
7.1.180.0070.00715.84
7.1.170.0100.00315.90
7.1.160.0100.00715.77
7.1.150.0000.00815.77
7.1.140.0140.00715.63
7.1.130.0110.00015.91
7.1.120.0000.01115.80
7.1.110.0030.01015.99
7.1.100.0020.01216.96
7.1.90.0070.00715.61
7.1.80.0000.01315.67
7.1.70.0070.00316.31
7.1.60.0100.01017.66
7.1.50.0070.00716.41
7.1.40.0000.01215.80
7.1.30.0060.00315.80
7.1.20.0030.00915.84
7.1.10.0030.01315.70
7.1.00.0050.04218.94
7.0.330.0000.00815.57
7.0.320.0060.00915.27
7.0.310.0080.00415.38
7.0.300.0100.00315.47
7.0.290.0120.00315.53
7.0.280.0000.00915.49
7.0.270.0030.01215.32
7.0.260.0100.00615.36
7.0.250.0090.00315.56
7.0.240.0120.00615.15
7.0.230.0120.00615.50
7.0.220.0030.01015.57
7.0.210.0000.01515.29
7.0.200.0060.00515.92
7.0.190.0000.01415.57
7.0.180.0060.00615.46
7.0.170.0080.00615.26
7.0.160.0030.01015.56
7.0.150.0030.01315.25
7.0.140.0080.00315.60
7.0.130.0070.00715.37
7.0.120.0000.01015.04
7.0.110.0040.01115.44
7.0.100.0100.00715.29
7.0.90.0030.00915.07
7.0.80.0030.00915.38
7.0.70.0040.01115.20
7.0.60.0130.03817.63
7.0.50.0030.04916.57
7.0.40.0100.04516.72
7.0.30.0270.03516.73
7.0.20.0170.01816.85
7.0.10.0070.02316.71
7.0.00.0030.04916.89
5.6.400.0000.00914.25
5.6.390.0000.00914.18
5.6.380.0030.01313.84
5.6.370.0060.00913.96
5.6.360.0070.01114.12
5.6.350.0040.01114.39
5.6.340.0030.00914.13
5.6.330.0080.00414.16
5.6.320.0100.00314.39
5.6.310.0080.00813.98
5.6.300.0140.00314.00
5.6.290.0030.01314.03
5.6.280.0030.02017.52
5.6.270.0070.01114.22
5.6.260.0030.01413.99
5.6.250.0100.00714.16
5.6.240.0000.01214.25
5.6.230.0110.00614.00
5.6.220.0110.00714.20
5.6.210.0070.04317.38
5.6.200.0080.04316.08
5.6.190.0180.03817.41
5.6.180.0130.02917.26
5.6.170.0140.04717.17
5.6.160.0060.02417.23
5.6.150.0070.02216.07
5.6.140.0080.04216.28
5.6.130.0050.02616.29
5.6.120.0030.03017.57
5.6.110.0030.03517.61
5.6.100.0080.04817.61
5.6.90.0030.02717.51
5.6.80.0020.02417.24
5.6.70.0050.00814.00
5.6.60.0030.00614.10
5.6.50.0080.00514.07
5.6.40.0000.01213.88
5.6.30.0080.00414.14
5.6.20.0060.00614.07
5.6.10.0030.00914.13
5.6.00.0080.00414.01
5.5.380.0000.01314.04
5.5.370.0080.00813.96
5.5.360.0000.01313.76
5.5.350.0160.03817.20
5.5.340.0130.03516.04
5.5.330.0150.03517.32
5.5.320.0320.04117.06
5.5.310.0190.02017.30
5.5.300.0080.03516.29
5.5.290.0050.04516.19
5.5.280.0020.02917.22
5.5.270.0060.03017.44
5.5.260.0090.03017.44
5.5.250.0040.03417.03
5.5.240.0120.02217.11
5.5.230.0100.00314.03
5.5.220.0000.01713.89
5.5.210.0000.00913.87
5.5.200.0040.00713.69
5.5.190.0000.00913.98
5.5.180.0030.00614.05
5.5.170.0000.01713.67
5.5.160.0080.00414.15
5.5.150.0030.00614.17
5.5.140.0070.00713.81
5.5.130.0070.00313.90
5.5.120.0070.00413.86
5.5.110.0110.00313.64
5.5.100.0060.00613.99
5.5.90.0060.01013.70
5.5.80.0000.00814.23
5.5.70.0030.01013.75
5.5.60.0000.00913.99
5.5.50.0000.01213.73
5.5.40.0000.00814.13
5.5.30.0050.00513.84
5.5.20.0100.00714.12
5.5.10.0030.01014.00
5.5.00.0040.00714.21

preferences:
81.23 ms | 401 KiB | 5 Q