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 PrivateJet extends Aircraft { private $arrivalCity; /** * @var string */ private $airportDestination; public function __construct( string $aircraftType, string $departureCity, string $arrivalCity, string $airportDestination ) { parent::__construct($aircraftType, $departureCity, $arrivalCity); $this->airportDestination = $airportDestination; } public function __toString(): string { return sprintf( "%s\n" . "Notre arrivé se fera à l'aéroport %s.", parent::__toString(), $this->airportDestination() ); } public function airportDestination(): string { return $this->airportDestination; } } echo new PrivateJet('Wijet', 'Lyon', 'Bordeaux', 'de Bordeaux-Mérignac');

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.00018.30
8.3.50.0110.00417.85
8.3.40.0150.00018.60
8.3.30.0030.01418.85
8.3.20.0040.00421.91
8.3.10.0050.00221.90
8.3.00.0000.00821.72
8.2.180.0000.01416.36
8.2.170.0070.00722.96
8.2.160.0040.01122.96
8.2.150.0000.00824.18
8.2.140.0070.00024.66
8.2.130.0080.00019.21
8.2.120.0080.00026.35
8.2.110.0060.00320.39
8.2.100.0080.00417.48
8.2.90.0030.00617.63
8.2.80.0040.00418.73
8.2.70.0080.00017.93
8.2.60.0060.00318.34
8.2.50.0070.00418.10
8.2.40.0040.00419.38
8.2.30.0000.00719.19
8.2.20.0000.00718.15
8.2.10.0070.00018.05
8.2.00.0000.00717.97
8.1.280.0120.00625.92
8.1.270.0040.00422.01
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00621.86
8.1.230.0040.00717.64
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0000.01017.22
8.1.190.0040.00417.25
8.1.180.0000.00818.10
8.1.170.0030.00618.43
8.1.160.0050.00218.83
8.1.150.0070.00018.81
8.1.140.0040.00419.04
8.1.130.0000.00717.79
8.1.120.0070.00017.43
8.1.110.0030.00617.41
8.1.100.0070.00017.56
8.1.90.0000.00817.55
8.1.80.0000.00717.41
8.1.70.0030.00317.51
8.1.60.0040.00417.56
8.1.50.0040.00417.45
8.1.40.0000.00817.48
8.1.30.0030.00617.67
8.1.20.0000.00817.67
8.1.10.0040.00417.60
8.1.00.0030.00617.53
8.0.300.0070.00018.77
8.0.290.0080.00016.75
8.0.280.0030.00518.39
8.0.270.0070.00017.24
8.0.260.0030.00317.23
8.0.250.0030.00316.92
8.0.240.0000.00716.97
8.0.230.0040.00416.85
8.0.220.0040.00416.81
8.0.210.0040.00416.90
8.0.200.0000.00617.02
8.0.190.0040.00417.05
8.0.180.0030.00316.82
8.0.170.0030.00616.90
8.0.160.0000.00716.98
8.0.150.0040.00416.88
8.0.140.0040.00416.77
8.0.130.0050.00013.34
8.0.120.0000.00816.88
8.0.110.0050.00316.81
8.0.100.0020.00516.86
8.0.90.0040.00416.73
8.0.80.0080.01516.86
8.0.70.0000.00716.77
8.0.60.0040.00416.95
8.0.50.0000.00716.82
8.0.30.0090.01217.07
8.0.20.0110.01017.40
8.0.10.0080.00016.95
8.0.00.0160.00316.80
7.4.330.0050.00015.55
7.4.320.0020.00516.43
7.4.300.0030.00316.67
7.4.290.0000.00716.55
7.4.280.0040.00416.52
7.4.270.0000.00716.39
7.4.260.0000.00716.52
7.4.250.0000.00716.49
7.4.240.0040.00416.64
7.4.230.0000.00716.53
7.4.220.0050.00216.59
7.4.210.0120.00516.60
7.4.200.0040.00416.46
7.4.160.0080.01016.53
7.4.150.0100.01017.40
7.4.140.0100.01217.86
7.4.130.0090.00916.51
7.4.120.0100.00916.55
7.4.110.0100.00716.63
7.4.100.0120.00916.55
7.4.90.0170.00016.59
7.4.80.0130.01019.39
7.4.70.0040.01416.57
7.4.60.0100.01016.43
7.4.50.0150.00016.49
7.4.40.0140.00816.61
7.4.30.0060.00916.54
7.4.00.0080.01014.90
7.3.330.0000.00513.27
7.3.320.0000.00513.28
7.3.310.0030.00316.32
7.3.300.0030.00316.14
7.3.290.0050.00216.29
7.3.280.0080.00816.30
7.3.270.0100.00717.40
7.3.260.0080.01116.35
7.3.250.0120.00816.44
7.3.240.0090.01016.33
7.3.230.0030.01416.25
7.3.210.0030.01316.48
7.3.200.0060.01016.42
7.3.190.0120.00916.34
7.3.180.0060.00916.20
7.3.170.0110.00716.45
7.3.160.0120.00316.36
7.3.120.0030.01014.68
7.3.110.0030.01714.62
7.3.100.0030.01414.42
7.3.90.0030.00514.67
7.3.80.0090.00914.84
7.3.70.0030.00614.65
7.3.60.0090.00614.93
7.3.50.0040.00714.70
7.3.40.0070.00414.62
7.3.30.0030.01014.45
7.3.20.0030.01016.69
7.3.10.0140.00316.33
7.3.00.0030.01016.63
7.2.330.0090.00916.61
7.2.320.0120.00616.46
7.2.310.0070.01016.78
7.2.300.0030.01416.51
7.2.290.0040.01216.77
7.2.250.0000.02314.98
7.2.240.0130.00714.93
7.2.230.0040.01114.92
7.2.220.0000.01515.25
7.2.210.0070.00314.91
7.2.200.0000.01215.00
7.2.190.0070.01114.93
7.2.180.0060.00615.00
7.2.170.0060.01014.73
7.2.160.0040.00415.00
7.2.150.0110.00417.01
7.2.140.0160.00016.90
7.2.130.0040.01116.98
7.2.120.0070.00716.98
7.2.110.0070.00716.94
7.2.100.0030.01016.77
7.2.90.0070.00717.15
7.2.80.0030.00716.64
7.2.70.0070.01016.88
7.2.60.0050.01216.66
7.2.50.0070.00717.07
7.2.40.0090.00616.95
7.2.30.0090.00616.80
7.2.20.0040.00816.63
7.2.10.0040.01116.79
7.2.00.0070.01318.45
7.1.330.0060.00915.82
7.1.320.0040.00715.82
7.1.310.0030.00616.07
7.1.300.0090.00915.97
7.1.290.0000.01415.70
7.1.280.0090.00315.80
7.1.270.0000.00915.76
7.1.260.0030.01315.83
7.1.250.0030.01015.64
7.1.240.0070.00715.88
7.1.230.0090.00615.69
7.1.220.0040.00415.88
7.1.210.0000.01315.90
7.1.200.0030.00915.87
7.1.190.0080.00815.85
7.1.180.0000.01315.54
7.1.170.0000.01315.75
7.1.160.0100.00015.70
7.1.150.0030.00715.53
7.1.140.0030.01615.90
7.1.130.0120.00615.70
7.1.120.0090.00817.07
7.1.110.0070.00916.94
7.1.100.0060.00816.95
7.1.90.0060.00816.75
7.1.80.0030.01216.93
7.1.70.0060.00916.43
7.1.60.0100.00925.25
7.1.50.0090.01325.21
7.1.40.0110.01125.06
7.1.30.0090.01725.08
7.1.20.0120.01625.17
7.1.10.0090.00616.38
7.1.00.0040.00916.20
7.0.330.0100.00015.43
7.0.320.0030.00515.07
7.0.310.0070.00715.44
7.0.300.0040.00715.39
7.0.290.0030.01315.31
7.0.280.0070.00715.39
7.0.270.0060.01015.20
7.0.260.0000.01415.33
7.0.250.0000.01115.43
7.0.240.0060.00915.25
7.0.230.0090.00615.30
7.0.220.0000.01315.58
7.0.210.0070.00715.24
7.0.200.0090.00315.20
7.0.190.0110.00415.50
7.0.180.0030.00615.27
7.0.170.0070.00715.14
7.0.160.0000.00915.63
7.0.150.0000.01515.29
7.0.140.0070.00415.38
7.0.130.0040.00715.42
7.0.120.0060.00615.27
7.0.110.0060.01015.50
7.0.100.0030.00715.51
7.0.90.0000.01315.43
7.0.80.0030.01015.44
7.0.70.0060.00915.44
7.0.60.0060.00615.45
7.0.50.0030.00615.46
7.0.40.0030.01013.40
7.0.30.0030.00513.35
7.0.20.0040.01113.52
7.0.10.0070.00413.44
7.0.00.0070.01013.56
5.6.400.0000.01014.10
5.6.390.0040.00714.13
5.6.380.0030.00614.16
5.6.370.0040.01414.17
5.6.360.0030.00914.02
5.6.350.0060.00914.12
5.6.340.0130.00314.09
5.6.330.0040.00414.38
5.6.320.0040.01113.82
5.6.310.0040.00414.28
5.6.300.0060.00314.44
5.6.290.0030.01013.95
5.6.280.0060.00914.26
5.6.270.0120.00014.20
5.6.260.0000.01214.11
5.6.250.0060.00613.96
5.6.240.0080.00814.21
5.6.230.0060.00913.97
5.6.220.0090.00614.14
5.6.210.0030.00914.13
5.6.200.0030.00614.09
5.6.190.0000.01414.18
5.6.180.0090.00613.87
5.6.170.0060.01214.32
5.6.160.0070.00314.12
5.6.150.0060.00614.18
5.6.140.0030.00914.10
5.6.130.0040.00714.10
5.6.120.0000.01214.13
5.6.110.0000.00814.04
5.6.100.0030.01014.12
5.6.90.0070.00714.20
5.6.80.0070.00714.13
5.6.70.0040.00414.26
5.6.60.0040.01114.29
5.6.50.0080.00613.77
5.6.40.0030.01014.01
5.6.30.0060.00613.97
5.6.20.0030.00614.10
5.6.10.0000.00913.94
5.6.00.0100.00014.01

preferences:
56.53 ms | 401 KiB | 5 Q