3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Sample { private string $instantiatedViaConstructor; private ?string $notInstantiated = null; public function __construct(string $instantiatedViaConstructor) { $this->instantiatedViaConstructor = $instantiatedViaConstructor; } public function getNotInstantiated(): ?string { return $this->notInstantiated; } public function getWorkingNotInstantiated(): ?string { return $this->notInstantiated ?? null; } } var_dump((new Sample('foo'))->getWorkingNotInstantiated()); var_dump((new Sample('foo'))->getNotInstantiated());

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.0060.01217.45
8.5.20.0090.00819.45
8.5.10.0080.00919.09
8.5.00.0140.00919.86
8.4.180.0100.01021.90
8.4.170.0110.01223.80
8.4.160.0110.01123.75
8.4.150.0090.00416.87
8.4.140.0110.01117.52
8.4.130.0130.00618.06
8.4.120.0110.00920.64
8.4.110.0100.00724.25
8.4.100.0110.00617.63
8.4.90.0040.00519.71
8.4.80.0100.01117.86
8.4.70.0140.00617.82
8.4.60.0150.00618.61
8.4.50.0150.00517.59
8.4.40.0050.00517.74
8.4.30.0050.00320.46
8.4.20.0160.00318.08
8.4.10.0030.00619.42
8.3.300.0130.00720.64
8.3.290.0110.00918.56
8.3.280.0130.01018.37
8.3.270.0140.01116.58
8.3.260.0060.00416.42
8.3.250.0120.00618.83
8.3.240.0140.00516.55
8.3.230.0140.00616.46
8.3.220.0040.00418.91
8.3.210.0150.00416.41
8.3.200.0060.00316.51
8.3.190.0060.00517.11
8.3.180.0080.01116.64
8.3.170.0120.00618.76
8.3.160.0040.01116.72
8.3.150.0120.00620.66
8.3.140.0110.00418.87
8.3.130.0040.00418.66
8.3.120.0060.00319.17
8.3.110.0030.01020.94
8.3.100.0080.00816.51
8.3.90.0110.00726.77
8.3.80.0030.00616.75
8.3.70.0100.01016.63
8.3.60.0140.00718.30
8.3.50.0100.00823.62
8.3.40.0070.01518.71
8.3.30.0160.00018.67
8.3.20.0040.00421.03
8.3.10.0040.00423.48
8.3.00.0060.00319.75
8.2.300.0080.01118.00
8.2.290.0100.00920.39
8.2.280.0050.00918.53
8.2.270.0140.00717.43
8.2.260.0080.00016.92
8.2.250.0000.00816.88
8.2.240.0030.00617.17
8.2.230.0070.00422.58
8.2.220.0040.00424.06
8.2.210.0090.00626.77
8.2.200.0030.00616.50
8.2.190.0090.00616.75
8.2.180.0040.01818.11
8.2.170.0110.00422.96
8.2.160.0120.00321.08
8.2.150.0060.00324.18
8.2.140.0070.00024.66
8.2.130.0040.00426.16
8.2.120.0000.00826.16
8.2.110.0000.00920.35
8.2.100.0080.00417.72
8.2.90.0000.00818.04
8.2.80.0050.00318.03
8.2.70.0030.00617.50
8.2.60.0000.00817.63
8.2.50.0080.00018.05
8.2.40.0030.00618.22
8.2.30.0040.00419.44
8.2.20.0040.00417.98
8.2.10.0040.00419.17
8.2.00.0000.00819.17
8.1.340.0130.00717.38
8.1.330.0100.00718.61
8.1.320.0120.00815.97
8.1.310.0080.00016.60
8.1.300.0100.00620.25
8.1.290.0030.00630.84
8.1.280.0090.00625.92
8.1.270.0030.00620.64
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.96
8.1.230.0120.00019.20
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.23
8.1.190.0040.00417.10
8.1.180.0000.00818.10
8.1.170.0040.00417.62
8.1.160.0020.00518.77
8.1.150.0070.00018.62
8.1.140.0040.00420.64
8.1.130.0040.00420.19
8.1.120.0070.00017.23
8.1.110.0000.00817.39
8.1.100.0030.00617.41
8.1.90.0030.00617.37
8.1.80.0000.00817.31
8.1.70.0040.00417.43
8.1.60.0080.00017.60
8.1.50.0000.00817.45
8.1.40.0080.00017.43
8.1.30.0000.01017.68
8.1.20.0000.00717.62
8.1.10.0050.00317.61
8.1.00.0040.00417.37
8.0.300.0070.00021.46
8.0.290.0000.00716.60
8.0.280.0030.00318.35
8.0.270.0030.00317.81
8.0.260.0040.00419.87
8.0.250.0050.00316.77
8.0.240.0060.00316.83
8.0.230.0030.00516.83
8.0.220.0030.00316.82
8.0.210.0000.00816.88
8.0.200.0000.00716.92
8.0.190.0000.00816.89
8.0.180.0000.00816.83
8.0.170.0090.00016.81
8.0.160.0040.00416.85
8.0.150.0040.00416.77
8.0.140.0040.00416.80
8.0.130.0060.00313.30
8.0.120.0050.00216.71
8.0.110.0030.00716.87
8.0.100.0040.00416.87
8.0.90.0030.00616.67
8.0.80.0080.00816.87
8.0.70.0000.00716.81
8.0.60.0040.00416.90
8.0.50.0070.00016.89
8.0.30.0030.01316.88
8.0.20.0120.00816.98
8.0.10.0000.00716.95
8.0.00.0120.00616.82
7.4.330.0030.00315.55
7.4.320.0000.00616.55
7.4.300.0000.00616.42
7.4.290.0050.00216.52
7.4.280.0000.00716.61
7.4.270.0030.00616.43
7.4.260.0000.00716.50
7.4.250.0070.00016.55
7.4.240.0040.00316.55
7.4.230.0070.00016.50
7.4.220.0030.00316.42
7.4.210.0090.00616.63
7.4.200.0020.00516.32
7.4.130.0130.00516.59
7.4.120.0060.01616.54
7.4.110.0080.01116.62
7.4.100.0100.00616.49
7.4.90.0030.01316.61
7.4.80.0040.01819.39
7.4.70.0130.00316.69
7.4.60.0100.00616.57
7.4.50.0030.01016.49
7.4.40.0110.00816.32
7.4.20.0060.01116.21
7.4.10.0030.01216.25
7.4.00.0060.00916.38
7.3.330.0040.00416.03
7.3.320.0060.00013.10
7.3.310.0000.00716.25
7.3.300.0030.00316.16
7.3.290.0060.00916.21
7.3.280.0080.00516.12
7.3.260.0050.01416.21
7.3.240.0090.01016.23
7.3.230.0120.00616.23
7.3.210.0120.00916.16
7.3.200.0140.00716.09
7.3.190.0080.01016.18
7.3.180.0080.00816.18
7.3.170.0170.00716.36
7.3.160.0030.01716.14
7.3.140.0170.00316.35
7.3.130.0090.00616.05
7.3.120.0060.01516.06
7.3.110.0120.00616.31
7.3.100.0090.00616.11
7.3.90.0070.00716.09
7.3.80.0040.01216.13
7.3.70.0070.00716.10
7.3.60.0070.00716.13
7.3.50.0120.00315.97
7.3.40.0100.00316.09
7.3.30.0090.00916.17
7.3.20.0070.01016.30
7.3.10.0070.01016.15
7.3.00.0160.00316.29
7.2.330.0150.00316.28
7.2.320.0060.01216.40
7.2.310.0060.01016.21
7.2.300.0070.01616.31
7.2.290.0090.00616.23
7.2.270.0090.01216.42
7.2.260.0120.00316.47
7.2.250.0060.01516.18
7.2.240.0100.00716.55
7.2.230.0060.00916.01
7.2.220.0090.00616.43
7.2.210.0000.01416.32
7.2.200.0040.01116.24
7.2.190.0060.00916.39
7.2.180.0090.00616.30
7.2.170.0100.00716.32
7.2.160.0090.00616.28
7.2.150.0070.01016.59
7.2.140.0100.00716.50
7.2.130.0090.00916.20
7.2.120.0040.01416.31
7.2.110.0120.00916.30
7.2.100.0030.01916.45
7.2.90.0160.00616.50
7.2.80.0160.00016.30
7.2.70.0090.00916.24
7.2.60.0060.00916.28
7.2.50.0060.00916.32
7.2.40.0030.01316.41
7.2.30.0060.01016.48
7.2.20.0150.00616.47
7.2.10.0050.01116.31
7.2.00.0080.00816.23

preferences:
42.63 ms | 1481 KiB | 5 Q