3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Aircraft { /** * @var string */ private $aircraftType; /** * @var string */ private $departureCity; /** * @var string */ private $arrivalCity; public function __construct( string $aircraftType, string $departureCity, string $arrivalCity ) { $this->aircraftType = $aircraftType; $this->departureCity = $departureCity; $this->arrivalCity = $arrivalCity; } public function __toString(): string { return sprintf( "Bienvenue à bord de notre %s.\n" . "Ce vol est en décollage imminent de %s et aura pour arrivée %s.", $this->aircraftType(), $this->departureCity(), $this->arrivalCity() ); } public function aircraftType(): string { return $this->aircraftType; } public function departureCity(): string { return $this->departureCity; } public function arrivalCity(): string { return $this->arrivalCity; } } class LowCostAircraft extends Aircraft { public function __construct( string $aircraftType, string $departureCity, string $arrivalCity ) { parent::__construct($aircraftType, $departureCity, $arrivalCity); } public function arrivalCity(): string { return sprintf("%s.\nLe moteur est le coeur d'un avion, mais le pilote est son âme", parent::arrivalCity()); } } echo new LowCostAircraft('easyJet', 'Nice', 'Mulhouse');

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.0190.00618.25
8.3.50.0070.00718.12
8.3.40.0150.00418.93
8.3.30.0090.00618.84
8.3.20.0060.00321.76
8.3.10.0040.00423.66
8.3.00.0040.00421.89
8.2.180.0000.01425.92
8.2.170.0110.00322.96
8.2.160.0110.00422.25
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0060.00319.40
8.2.120.0080.00026.35
8.2.110.0090.00021.18
8.2.100.0090.00317.66
8.2.90.0030.00617.84
8.2.80.0000.00819.25
8.2.70.0050.00317.71
8.2.60.0030.00617.93
8.2.50.0040.00418.16
8.2.40.0040.00420.47
8.2.30.0030.00620.91
8.2.20.0040.00418.22
8.2.10.0000.00718.10
8.2.00.0000.00819.91
8.1.280.0090.00625.92
8.1.270.0030.00522.11
8.1.260.0080.00026.35
8.1.250.0060.00328.09
8.1.240.0100.00021.94
8.1.230.0110.00021.04
8.1.220.0080.00017.74
8.1.210.0090.00018.77
8.1.200.0060.00317.35
8.1.190.0080.00017.23
8.1.180.0040.00418.10
8.1.170.0050.00320.12
8.1.160.0040.00418.91
8.1.150.0040.00418.84
8.1.140.0000.00819.03
8.1.130.0000.00717.81
8.1.120.0070.00017.45
8.1.110.0000.00817.44
8.1.100.0040.00417.39
8.1.90.0000.00817.44
8.1.80.0040.00417.46
8.1.70.0040.00417.56
8.1.60.0050.00317.68
8.1.50.0000.00817.61
8.1.40.0060.00317.48
8.1.30.0040.00417.71
8.1.20.0050.00317.57
8.1.10.0030.00617.50
8.1.00.0030.00517.60
8.0.300.0080.00020.09
8.0.290.0050.00316.88
8.0.280.0070.00018.48
8.0.270.0070.00016.82
8.0.260.0030.00317.25
8.0.250.0070.00017.00
8.0.240.0070.00017.04
8.0.230.0050.00317.02
8.0.220.0040.00316.81
8.0.210.0040.00416.91
8.0.200.0020.00517.00
8.0.190.0040.00416.93
8.0.180.0030.00516.95
8.0.170.0080.00316.92
8.0.160.0000.00716.95
8.0.150.0040.00416.92
8.0.140.0070.00016.91
8.0.130.0000.00613.33
8.0.120.0030.00616.91
8.0.110.0000.00916.86
8.0.100.0000.00716.92
8.0.90.0000.00716.96
8.0.80.0170.00316.82
8.0.70.0040.00416.84
8.0.60.0050.00316.81
8.0.50.0040.00416.96
8.0.30.0120.00717.10
8.0.20.0130.00717.40
8.0.10.0040.00417.11
8.0.00.0100.01216.89
7.4.330.0030.00315.55
7.4.320.0030.00316.60
7.4.300.0030.00316.50
7.4.290.0040.00416.61
7.4.280.0000.00816.63
7.4.270.0080.00016.54
7.4.260.0030.00316.67
7.4.250.0000.00716.64
7.4.240.0000.00816.57
7.4.230.0000.00716.30
7.4.220.0040.00416.44
7.4.210.0100.00616.58
7.4.200.0000.00716.63
7.4.160.0080.00816.55
7.4.150.0090.00817.40
7.4.140.0140.00617.86
7.4.130.0130.00316.55
7.4.120.0130.00716.53
7.4.110.0110.00716.64
7.4.100.0110.00716.36
7.4.90.0130.00316.48
7.4.80.0120.00619.39
7.4.70.0070.01116.58
7.4.60.0070.01416.57
7.4.50.0040.01116.54
7.4.40.0090.00916.48
7.4.30.0030.01316.61
7.4.00.0060.00614.97
7.3.330.0030.00313.25
7.3.320.0030.00313.09
7.3.310.0000.00816.28
7.3.300.0000.00716.25
7.3.290.0030.00316.14
7.3.280.0040.01316.29
7.3.270.0090.00917.40
7.3.260.0110.00916.44
7.3.250.0080.01116.40
7.3.240.0090.01116.40
7.3.230.0070.01016.26
7.3.210.0110.00716.17
7.3.200.0070.01316.18
7.3.190.0060.01616.59
7.3.180.0060.01016.41
7.3.170.0120.00916.28
7.3.160.0000.01716.38
7.3.00.0060.01016.25
7.2.330.0090.00916.39
7.2.320.0130.00316.60
7.2.310.0100.00716.61
7.2.300.0120.00616.52
7.2.290.0030.01316.55
7.2.130.0140.00016.77
7.2.120.0030.01016.52
7.2.110.0140.00316.92
7.2.100.0070.01016.76
7.2.90.0070.00716.48
7.2.80.0060.00317.04
7.2.70.0060.00616.41
7.2.60.0080.00616.72
7.2.50.0070.01016.87
7.2.40.0060.00916.79
7.2.30.0090.00316.88
7.2.20.0090.00016.83
7.2.10.0110.00716.58
7.2.00.0090.01218.26
7.1.250.0060.00615.65
7.1.240.0000.01315.50
7.1.230.0090.00615.62
7.1.220.0030.00715.71
7.1.210.0090.00015.81
7.1.200.0050.00715.65
7.1.190.0030.01015.84
7.1.180.0030.01015.59
7.1.170.0070.00715.61
7.1.160.0000.01115.44
7.1.150.0110.00615.63
7.1.140.0030.01115.43
7.1.130.0120.00615.45
7.1.120.0110.01017.18
7.1.110.0070.00816.98
7.1.100.0080.00616.94
7.1.90.0100.01016.68
7.1.80.0160.00915.63
7.1.70.0100.00815.51
7.1.60.0180.01124.09
7.1.50.0160.00724.24
7.1.40.0140.01424.16
7.1.30.0250.00524.13
7.1.20.0120.00825.16
7.1.10.0160.00314.98
7.1.00.0080.01215.22
7.0.330.0030.01015.43
5.6.380.0030.00613.91

preferences:
58.61 ms | 401 KiB | 5 Q