3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); class Thing{ public function doSomething() : void{} } class ParentC{ /** @var Thing|null */ protected $thing; protected function __construct(){ $this->thing = null; } } class HelloWorld extends ParentC { public function __construct(Thing $thing){ $this->thing = $thing; parent::__construct(); $this->thing->doSomething(); //bang } } new HelloWorld(new Thing);

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.80.0060.00319.36
8.3.70.0090.00616.75
8.3.60.0070.00718.52
8.3.50.0130.00716.19
8.3.40.0060.00918.84
8.3.30.0180.00018.97
8.3.20.0050.00324.18
8.3.10.0040.00424.66
8.3.00.0050.00326.16
8.2.200.0120.00018.88
8.2.190.0110.00716.91
8.2.180.0100.01025.92
8.2.170.0130.00719.13
8.2.160.0100.01022.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0000.00726.16
8.2.120.0050.00226.35
8.2.110.0100.00021.18
8.2.100.0070.00417.78
8.2.90.0040.00419.05
8.2.80.0050.00317.97
8.2.70.0040.00417.63
8.2.60.0030.00517.93
8.2.50.0040.00418.07
8.2.40.0000.00818.16
8.2.30.0040.00417.91
8.2.20.0040.00417.88
8.2.10.0000.00819.30
8.2.00.0040.00419.21
8.1.290.0090.00030.84
8.1.280.0070.01425.92
8.1.270.0040.00423.99
8.1.260.0040.00428.09
8.1.250.0070.00028.09
8.1.240.0030.00621.25
8.1.230.0090.00317.82
8.1.220.0040.00717.74
8.1.210.0040.00418.77
8.1.200.0060.00317.11
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0090.00018.38
8.1.160.0040.00418.90
8.1.150.0040.00418.87
8.1.140.0040.00418.93
8.1.130.0050.00320.04
8.1.120.0000.00717.30
8.1.110.0030.00617.44
8.1.100.0070.00017.44
8.1.90.0000.00717.43
8.1.80.0040.00417.32
8.1.70.0030.00317.41
8.1.60.0000.00817.60
8.1.50.0000.00817.58
8.1.40.0080.00317.51
8.1.30.0040.00417.73
8.1.20.0000.00717.63
8.1.10.0090.00017.44
8.1.00.0000.00817.54
8.0.300.0030.00718.77
8.0.290.0040.00416.75
8.0.280.0030.00518.37
8.0.270.0030.00318.02
8.0.260.0030.00318.49
8.0.250.0040.00417.01
8.0.240.0030.00317.00
8.0.230.0040.00416.93
8.0.220.0040.00416.93
8.0.210.0030.00316.91
8.0.200.0030.00316.84
8.0.190.0050.00316.85
8.0.180.0050.00316.89
8.0.170.0030.00516.79
8.0.160.0000.00816.99
8.0.150.0050.00316.84
8.0.140.0070.00016.86
8.0.130.0000.00513.31
8.0.120.0030.00516.85
8.0.110.0000.00716.82
8.0.100.0040.00416.92
8.0.90.0050.00316.77
8.0.80.0060.01016.85
8.0.70.0000.00816.96
8.0.60.0030.00616.90
8.0.50.0000.00816.96
8.0.30.0060.01016.86
8.0.20.0060.01517.04
8.0.10.0020.00516.93
8.0.00.0220.01417.86
7.4.330.0000.00515.55
7.4.320.0030.00316.44
7.4.300.0000.00616.47
7.4.290.0000.00716.50
7.4.280.0070.00016.34
7.4.270.0030.00416.45
7.4.260.0030.00313.34
7.4.250.0000.00816.55
7.4.240.0040.00416.58
7.4.230.0040.00416.54
7.4.220.0020.00516.41
7.4.210.0080.00816.57
7.4.200.0030.00316.62
7.4.140.0070.01017.86
7.4.130.0190.01217.86
7.4.120.0260.00717.86
7.4.110.0260.00717.86
7.4.100.0330.00617.86
7.4.90.0170.01417.86
7.4.80.0240.00717.86
7.4.70.0180.01817.86
7.4.60.0200.01217.86
7.4.50.0180.01817.86
7.4.40.0220.01117.86
7.4.30.0160.01617.86
7.4.20.0190.01217.86
7.4.10.0280.00817.86
7.4.00.0180.01117.86
7.3.330.0000.00716.23
7.3.320.0000.00513.24
7.3.310.0000.00716.34
7.3.300.0030.00316.24
7.3.290.0090.00616.38
7.3.260.0310.00617.86
7.3.250.0320.00617.86
7.3.240.0210.01017.86
7.3.230.0190.01917.86
7.3.220.0270.00617.86
7.3.210.0240.00717.86
7.3.200.0230.00817.86
7.3.190.0320.00017.86
7.3.180.0240.00717.86
7.3.170.0210.01217.86
7.3.160.0190.01417.86
7.3.150.0310.00417.86
7.3.140.0290.01017.86
7.3.130.0320.00417.86
7.3.120.0250.01417.86
7.3.110.0310.00317.86
7.3.100.0300.00617.86
7.3.90.0310.00417.86
7.3.80.0250.01117.86
7.3.70.0260.01117.86
7.3.60.0250.00317.86
7.3.50.0210.01217.86
7.3.40.0170.01717.86
7.3.30.0250.00717.86
7.3.20.0250.00717.86
7.3.10.0230.00917.86
7.3.00.0190.01317.86

preferences:
28.36 ms | 402 KiB | 5 Q