3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class Animal { protected string $name; public function __construct(string $name) { $this->name = $name; } abstract public function speak(); } class Cat extends Animal { public function speak() { echo $this->name . " meows"; } } // However, covariant return types cannot return a more broad type interface AnimalShelter { public function adopt(string $name): Cat; } class CatShelter implements AnimalShelter { public function adopt(string $name): Animal { return new Animal($name); } } $kitty = (new CatShelter)->adopt("Ricky"); $kitty->speak();

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.5.30.0130.00617.13
8.5.20.0080.01019.34
8.5.10.0110.00716.68
8.5.00.0110.01220.11
8.4.180.0130.00919.55
8.4.170.0160.00720.45
8.4.160.0120.01322.05
8.4.150.0040.00216.87
8.4.140.0150.00617.75
8.4.130.0120.00818.59
8.4.120.0070.00424.13
8.4.110.0060.01318.95
8.4.100.0080.01117.50
8.4.90.0090.01120.61
8.4.80.0150.00520.66
8.4.70.0110.00818.88
8.4.60.0140.00618.92
8.4.50.0130.00720.33
8.4.40.0040.00419.39
8.4.30.0000.00818.73
8.4.20.0190.00317.81
8.4.10.0030.00619.49
8.3.300.0120.01020.83
8.3.290.0120.01120.80
8.3.280.0100.00918.39
8.3.270.0090.00916.86
8.3.260.0150.00416.62
8.3.250.0130.00618.73
8.3.240.0100.00916.72
8.3.230.0170.00216.66
8.3.220.0080.00718.73
8.3.210.0080.00616.73
8.3.200.0080.00116.57
8.3.190.0090.01017.19
8.3.180.0090.00519.11
8.3.170.0070.01118.93
8.3.160.0040.00416.91
8.3.150.0140.00019.01
8.3.140.0030.00620.90
8.3.130.0090.00618.62
8.3.120.0090.00918.94
8.3.110.0040.00416.72
8.3.100.0060.00316.92
8.3.90.0110.00716.66
8.3.80.0000.00918.30
8.3.70.0140.00718.43
8.3.60.0090.00918.43
8.3.50.0100.00924.62
8.3.40.0070.00718.71
8.3.30.0070.00718.44
8.3.20.0080.00021.91
8.3.10.0080.00021.90
8.3.00.0000.00723.45
8.2.300.0130.00722.28
8.2.290.0110.00816.70
8.2.280.0110.00920.26
8.2.270.0110.00716.62
8.2.260.0070.00716.83
8.2.250.0040.00416.61
8.2.240.0090.00618.96
8.2.230.0080.00020.94
8.2.220.0040.00424.06
8.2.210.0050.00326.77
8.2.200.0060.00318.54
8.2.190.0120.00316.58
8.2.180.0130.01016.38
8.2.170.0120.00618.83
8.2.160.0100.00722.96
8.2.150.0060.00324.18
8.2.140.0050.00224.66
8.2.130.0040.00426.16
8.2.120.0070.00026.16
8.2.110.0030.00622.09
8.2.100.0080.00317.78
8.2.90.0040.00417.75
8.2.80.0080.00017.97
8.2.70.0000.00817.63
8.2.60.0050.00317.63
8.2.50.0000.00818.05
8.2.40.0050.00318.03
8.2.30.0000.00719.31
8.2.20.0070.00017.92
8.2.10.0000.00719.18
8.2.00.0070.00019.23
8.1.340.0070.01219.59
8.1.330.0150.00715.97
8.1.320.0100.00818.05
8.1.310.0040.00416.65
8.1.300.0000.00817.64
8.1.290.0130.00018.88
8.1.280.0070.00725.92
8.1.270.0050.00320.17
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0090.00023.95
8.1.230.0070.00419.11
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0050.00517.13
8.1.190.0040.00717.22
8.1.180.0080.00018.10
8.1.170.0040.00417.62
8.1.160.0000.00718.75
8.1.150.0040.00418.71
8.1.140.0030.00618.89
8.1.130.0040.00420.13
8.1.120.0040.00417.39
8.1.110.0030.00517.41
8.1.100.0040.00417.35
8.1.90.0000.00917.39
8.1.80.0040.00417.35
8.1.70.0070.00017.41
8.1.60.0000.00817.42
8.1.50.0050.00217.43
8.1.40.0060.00317.41
8.1.30.0030.00617.52
8.1.20.0050.00517.61
8.1.10.0040.00417.42
8.1.00.0040.00717.37
8.0.300.0040.00419.77
8.0.290.0000.00916.63
8.0.280.0030.00318.34
8.0.270.0030.00317.93
8.0.260.0020.00518.32
8.0.250.0030.00316.99
8.0.240.0040.00416.84
8.0.230.0080.00016.95
8.0.220.0000.00816.89
8.0.210.0070.00016.87
8.0.200.0070.00017.02
8.0.190.0030.00516.98
8.0.180.0040.00416.93
8.0.170.0060.00316.93
8.0.160.0040.00416.91
8.0.150.0040.00316.90
8.0.140.0050.00216.87
8.0.130.0030.00313.37
8.0.120.0080.00016.87
8.0.110.0000.00916.96
8.0.100.0000.00816.84
8.0.90.0090.00016.76
8.0.80.0130.00616.90
8.0.70.0000.00716.96
8.0.60.0080.00016.77
8.0.50.0000.00716.88
8.0.30.0100.00617.26
8.0.20.0150.00317.31
8.0.10.0040.00416.98
8.0.00.0060.01316.84
7.4.330.0030.00315.55
7.4.320.0070.00016.47
7.4.300.0040.00416.42
7.4.290.0000.00716.52
7.4.280.0000.00716.53
7.4.270.0000.00716.40
7.4.260.0000.00513.22
7.4.250.0030.00316.50
7.4.240.0030.00316.57
7.4.230.0070.00016.64
7.4.220.0060.00216.31
7.4.210.0090.00716.53
7.4.200.0040.00416.66
7.4.130.0110.00816.53
7.4.120.0070.01116.59
7.4.110.0060.00916.59
7.4.100.0130.01016.40
7.4.90.0150.00916.66
7.4.80.0090.01119.39
7.4.70.0170.00316.53
7.4.60.0100.00716.41
7.4.50.0070.01116.19
7.4.40.0130.00516.51
7.4.30.0070.01016.37
7.4.20.0140.00316.25
7.4.10.0130.00716.07
7.4.00.0060.00916.32
7.3.330.0050.00216.26
7.3.320.0050.00013.07
7.3.310.0070.00016.10
7.3.300.0000.00616.19
7.3.290.0080.00816.21
7.3.260.0110.00816.21
7.3.240.0110.00816.20
7.3.230.0060.01216.28
7.3.210.0120.00616.25
7.3.200.0060.01116.16
7.3.190.0030.01416.22
7.3.180.0120.00416.42
7.3.170.0100.00616.08
7.3.160.0190.00016.20
7.3.150.0090.00616.41
7.3.140.0040.01116.32
7.3.130.0110.00516.30
7.3.120.0060.00916.12
7.3.110.0080.00816.23
7.3.100.0100.00716.17
7.3.90.0140.00316.27
7.3.80.0100.01016.13
7.3.70.0070.01016.11
7.3.60.0110.00616.13
7.3.50.0110.00516.16
7.3.40.0090.00616.09
7.3.30.0110.01116.23
7.3.20.0070.01016.29
7.3.10.0090.00916.02
7.3.00.0090.01016.39
7.2.330.0140.00316.35
7.2.320.0110.00616.53
7.2.310.0110.00716.11
7.2.300.0130.00916.30
7.2.290.0040.01216.48
7.2.280.0060.01016.42
7.2.270.0040.01416.42
7.2.260.0030.01316.22
7.2.250.0040.01716.18
7.2.240.0070.01016.49
7.2.230.0090.00916.50
7.2.220.0150.00616.23
7.2.210.0120.00916.53
7.2.200.0170.00716.29
7.2.190.0100.00716.18
7.2.180.0070.01116.18
7.2.170.0070.01116.36
7.2.160.0100.00616.03
7.2.150.0100.00716.48
7.2.140.0090.01216.16
7.2.130.0070.01016.34
7.2.120.0160.01016.20
7.2.110.0090.00916.40
7.2.100.0100.00716.47
7.2.90.0090.00916.28
7.2.80.0070.01116.17
7.2.70.0100.00716.46
7.2.60.0120.01016.19
7.2.50.0150.00616.43
7.2.40.0060.01216.36
7.2.30.0130.01016.54
7.2.20.0160.00616.34
7.2.10.0130.00616.28
7.2.00.0060.01316.18

preferences:
110.25 ms | 1528 KiB | 6 Q