3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Fruit {} class Banana extends Fruit {} class Lemon extends Fruit {} class Base { public function methodOne(Banana $x) {} public function methodTwo(array $x) {} } class OverrideNullable extends Base { public function methodOne(Banana $x = null) {} public function methodTwo(array $x = null) {} } class OverrideParent extends Base { public function methodOne(Fruit $x) {} } class OverrideWildcard extends Base { public function methodOne($x) {} public function methodTwo($x) {} } (new Base())->methodOne(new Banana()); (new Base())->methodTwo([]); (new OverrideNullable())->methodOne(); (new OverrideNullable())->methodTwo(); (new OverrideParent())->methodOne(new Lemon()); (new OverrideWildcard())->methodOne(''); (new OverrideWildcard())->methodTwo(''); echo "Output intentionally left blank." , PHP_EOL;

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.70.0060.01516.38
8.3.60.0070.00718.17
8.3.50.0110.00416.58
8.3.40.0040.01121.99
8.3.30.0070.00718.66
8.3.20.0070.00020.90
8.3.10.0080.00021.86
8.3.00.0080.00022.52
8.2.190.0120.00316.75
8.2.180.0070.00718.54
8.2.170.0090.00622.96
8.2.160.0030.01021.10
8.2.150.0040.00724.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0140.00019.39
8.2.110.0090.00020.58
8.2.100.0050.00817.78
8.2.90.0000.00817.63
8.2.80.0040.00418.64
8.2.70.0000.00818.04
8.2.60.0000.01017.78
8.2.50.0050.00519.22
8.2.40.0000.00821.13
8.2.30.0000.00819.08
8.2.20.0000.00817.96
8.2.10.0070.00019.13
8.2.00.0040.00419.18
8.1.280.0060.00925.92
8.1.270.0000.01022.34
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0070.00423.86
8.1.230.0060.00622.75
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0040.00417.13
8.1.180.0030.00618.97
8.1.170.0000.00818.48
8.1.160.0040.00418.96
8.1.150.0000.00818.66
8.1.140.0020.00520.51
8.1.130.0080.00021.86
8.1.120.0000.00717.39
8.1.110.0040.00417.38
8.1.100.0040.00417.35
8.1.90.0060.00317.36
8.1.80.0060.00317.39
8.1.70.0000.00717.31
8.1.60.0040.00417.46
8.1.50.0030.00617.54
8.1.40.0030.00517.39
8.1.30.0000.00817.65
8.1.20.0040.00417.48
8.1.10.0040.00417.59
8.1.00.0040.00417.44
8.0.300.0000.00718.77
8.0.290.0070.00016.75
8.0.280.0000.00718.52
8.0.270.0000.00716.94
8.0.260.0030.00320.09
8.0.250.0000.00716.97
8.0.240.0000.00716.84
8.0.230.0070.00016.84
8.0.220.0040.00416.86
8.0.210.0000.00716.88
8.0.200.0040.00416.82
8.0.190.0000.00816.89
8.0.180.0000.00816.88
8.0.170.0080.00316.90
8.0.160.0000.00716.79
8.0.150.0040.00416.76
8.0.140.0090.00016.71
8.0.130.0060.00013.25
8.0.120.0050.00316.85
8.0.110.0090.00016.89
8.0.100.0080.00016.67
8.0.90.0090.00016.86
8.0.80.0030.01216.82
8.0.70.0000.00816.74
8.0.60.0030.00516.85
8.0.50.0020.00516.89
8.0.30.0070.01017.13
8.0.20.0070.01216.84
8.0.10.0040.00416.89
8.0.00.0090.01016.86
7.4.330.0050.00015.55
7.4.320.0060.00016.41
7.4.300.0000.00616.50
7.4.290.0040.00416.47
7.4.280.0000.00916.51
7.4.270.0000.00716.48
7.4.260.0000.00613.18
7.4.250.0000.00816.45
7.4.240.0070.00216.54
7.4.230.0000.00716.37
7.4.220.0020.00516.25
7.4.210.0110.00516.50
7.4.200.0000.00716.55
7.4.130.0080.01116.52
7.4.120.0040.01816.55
7.4.110.0120.00616.60
7.4.100.0130.00316.66
7.4.90.0180.00616.41
7.4.80.0070.01119.39
7.4.70.0090.00916.72
7.4.60.0070.01016.70
7.4.50.0030.01216.16
7.4.40.0060.00916.42
7.4.30.0080.00816.59
7.4.20.0080.00716.08
7.4.10.0120.00416.24
7.4.00.0070.01016.41
7.3.330.0030.00316.36
7.3.320.0030.00313.38
7.3.310.0040.00316.22
7.3.300.0040.00416.20
7.3.290.0070.00816.27
7.3.260.0080.00816.30
7.3.240.0090.01116.32
7.3.230.0070.01016.31
7.3.210.0100.00716.39
7.3.200.0070.01016.52
7.3.190.0030.01616.23
7.3.180.0060.01516.42
7.3.170.0110.00616.37
7.3.160.0130.00316.39
7.3.150.0090.01216.32
7.3.140.0070.00716.34
7.3.130.0130.00316.50
7.3.120.0030.01316.22
7.3.110.0060.00916.38
7.3.100.0110.00816.38
7.3.90.0040.01516.31
7.3.80.0130.00616.28
7.3.70.0000.01516.32
7.3.60.0080.01116.29
7.3.50.0030.01316.19
7.3.40.0100.00716.24
7.3.30.0130.01016.29
7.3.20.0100.01316.39
7.3.10.0070.01516.25
7.3.00.0070.01616.29
7.2.330.0030.01516.60
7.2.320.0110.00516.29
7.2.310.0070.01016.48
7.2.300.0090.01416.66
7.2.290.0030.01416.46
7.2.280.0110.00416.66
7.2.270.0070.01016.48
7.2.260.0120.00816.47
7.2.250.0090.00616.65
7.2.240.0060.01016.68
7.2.230.0090.01216.46
7.2.220.0090.00616.39
7.2.210.0000.01616.48
7.2.200.0170.00316.46
7.2.190.0070.01416.45
7.2.180.0070.01016.48
7.2.170.0140.01016.56
7.2.160.0170.00616.49
7.2.150.0060.01816.69
7.2.140.0070.01616.39
7.2.130.0150.00916.69
7.2.120.0170.00716.66
7.2.110.0030.01316.71
7.2.100.0200.01316.61
7.2.90.0030.02016.49
7.2.80.0040.01916.54
7.2.70.0160.00716.75
7.2.60.0130.01016.46
7.2.50.0140.00816.59
7.2.40.0100.01316.65
7.2.30.0040.01916.64
7.2.20.0070.01016.57
7.2.10.0030.01416.57
7.2.00.0100.00616.68

preferences:
17.84 ms | 401 KiB | 5 Q