3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Sample { private string $instantiatedViaConstructor; private ?string $notInstantiated; 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.0100.00717.61
8.5.20.0100.00719.45
8.5.10.0110.00818.98
8.5.00.0040.00520.02
8.4.180.0100.01120.50
8.4.170.0130.00820.48
8.4.160.0130.00923.77
8.4.150.0080.00516.91
8.4.140.0130.00717.84
8.4.130.0120.00718.96
8.4.120.0110.00924.12
8.4.110.0140.00519.76
8.4.100.0150.00617.97
8.4.90.0070.00920.83
8.4.80.0110.00918.91
8.4.70.0060.00219.18
8.4.60.0110.00820.73
8.4.50.0130.00717.82
8.4.40.0060.00317.93
8.4.30.0090.00020.39
8.4.20.0110.00718.20
8.4.10.0090.00619.39
8.3.300.0040.00520.58
8.3.290.0150.00820.75
8.3.280.0110.01018.43
8.3.270.0140.00616.58
8.3.260.0110.00916.54
8.3.250.0100.00818.86
8.3.240.0120.00716.93
8.3.230.0130.00616.57
8.3.220.0120.00618.95
8.3.210.0120.00616.66
8.3.200.0060.00316.73
8.3.190.0120.00918.85
8.3.180.0130.00618.47
8.3.170.0100.01016.63
8.3.160.0110.00716.83
8.3.150.0090.00917.36
8.3.140.0000.00816.88
8.3.130.0030.00518.52
8.3.120.0050.00518.86
8.3.110.0050.00520.94
8.3.100.0040.00424.06
8.3.90.0080.00026.77
8.3.80.0000.00916.75
8.3.70.0040.01118.30
8.3.60.0090.01218.56
8.3.50.0090.00723.64
8.3.40.0170.00319.02
8.3.30.0110.00418.56
8.3.20.0040.00421.03
8.3.10.0080.00023.48
8.3.00.0070.00319.79
8.2.300.0120.00822.21
8.2.290.0120.00716.58
8.2.280.0080.01118.70
8.2.270.0090.00616.57
8.2.260.0140.00417.27
8.2.250.0030.00616.67
8.2.240.0160.00317.13
8.2.230.0090.00022.58
8.2.220.0030.00637.54
8.2.210.0080.00026.77
8.2.200.0080.00016.75
8.2.190.0130.00616.63
8.2.180.0140.00718.39
8.2.170.0180.00322.96
8.2.160.0090.00621.06
8.2.150.0110.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0060.00326.16
8.2.110.0000.01021.03
8.2.100.0120.00017.78
8.2.90.0050.00320.65
8.2.80.0000.00920.47
8.2.70.0050.00317.93
8.2.60.0090.00018.16
8.2.50.0000.00818.10
8.2.40.0040.00419.20
8.2.30.0000.00719.08
8.2.20.0030.00518.05
8.2.10.0070.00019.07
8.2.00.0050.00219.19
8.1.340.0140.00617.82
8.1.330.0090.01016.19
8.1.320.0080.00718.17
8.1.310.0140.00016.88
8.1.300.0050.00317.97
8.1.290.0030.00618.88
8.1.280.0030.01225.92
8.1.270.0030.00620.51
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0180.00022.19
8.1.230.0110.00020.88
8.1.220.0050.00317.74
8.1.210.0000.00818.84
8.1.200.0100.00017.23
8.1.190.0050.00317.10
8.1.180.0070.00019.02
8.1.170.0080.00018.50
8.1.160.0000.00818.96
8.1.150.0050.00518.64
8.1.140.0040.00420.65
8.1.130.0000.00820.23
8.1.120.0040.00417.33
8.1.110.0050.00217.37
8.1.100.0000.00917.37
8.1.90.0050.00317.28
8.1.80.0080.00417.06
8.1.70.0020.00517.31
8.1.60.0070.00317.63
8.1.50.0070.00317.57
8.1.40.0030.00617.54
8.1.30.0000.01017.65
8.1.20.0030.00517.55
8.1.10.0080.00017.42
8.1.00.0040.00417.41
8.0.300.0030.00320.11
8.0.290.0060.00316.75
8.0.280.0030.00518.28
8.0.270.0070.00016.73
8.0.260.0030.00320.01
8.0.250.0000.00716.96
8.0.240.0070.00016.98
8.0.230.0030.00316.94
8.0.220.0080.00016.93
8.0.210.0040.00416.85
8.0.200.0070.00016.87
8.0.190.0050.00316.86
8.0.180.0000.00816.93
8.0.170.0100.00016.91
8.0.160.0050.00216.95
8.0.150.0040.00416.84
8.0.140.0000.00816.82
8.0.130.0050.00013.26
8.0.120.0000.00716.72
8.0.110.0040.00416.77
8.0.100.0040.00416.96
8.0.90.0090.00016.88
8.0.80.0120.00416.85
8.0.70.0000.00716.88
8.0.60.0050.00316.94
8.0.50.0070.00016.83
8.0.30.0030.01217.17
8.0.20.0070.01116.78
8.0.10.0050.00217.05
8.0.00.0060.01316.75
7.4.330.0000.00415.55
7.4.320.0030.00316.41
7.4.300.0000.00616.50
7.4.290.0070.00016.43
7.4.280.0060.00316.43
7.4.270.0060.00316.55
7.4.260.0000.00613.27
7.4.250.0040.00416.55
7.4.240.0040.00316.61
7.4.230.0000.00816.63
7.4.220.0050.00216.48
7.4.210.0120.00816.63
7.4.200.0000.00716.54
7.4.130.0170.00516.55
7.4.120.0070.01016.66
7.4.110.0060.01216.45
7.4.100.0180.00316.63
7.4.90.0070.01016.64
7.4.80.0130.01019.39
7.4.70.0070.01016.53
7.4.60.0100.00616.63
7.4.50.0080.00616.41
7.4.40.0080.00816.72
7.4.20.0070.01216.34
7.4.10.0060.00916.29
7.4.00.0080.01116.34
7.3.330.0000.00715.99
7.3.320.0000.00513.07
7.3.310.0030.00316.31
7.3.300.0060.00016.13
7.3.290.0070.00816.17
7.3.280.0100.01016.20
7.3.260.0070.01016.18
7.3.240.0120.00616.22
7.3.230.0100.00716.14
7.3.210.0100.00716.12
7.3.200.0090.00816.37
7.3.190.0140.00316.39
7.3.180.0130.00616.13
7.3.170.0150.00616.27
7.3.160.0060.00916.44
7.3.140.0060.00916.01
7.3.130.0130.00316.17
7.3.120.0060.01116.08
7.3.110.0000.01616.22
7.3.100.0060.00916.26
7.3.90.0050.01016.21
7.3.80.0060.01216.08
7.3.70.0090.00616.05
7.3.60.0120.00316.30
7.3.50.0120.00316.20
7.3.40.0170.00716.23
7.3.30.0120.00916.18
7.3.20.0180.00316.14
7.3.10.0140.00716.25
7.3.00.0140.00416.14
7.2.330.0180.00616.52
7.2.320.0070.01016.15
7.2.310.0060.01016.46
7.2.300.0130.00516.27
7.2.290.0060.00916.43
7.2.270.0060.00916.06
7.2.260.0030.01216.39
7.2.250.0060.01016.33
7.2.240.0070.01016.55
7.2.230.0130.00916.32
7.2.220.0120.00616.53
7.2.210.0120.00916.27
7.2.200.0060.01216.26
7.2.190.0110.00516.32
7.2.180.0070.01116.39
7.2.170.0100.01316.18
7.2.160.0070.01116.39
7.2.150.0090.01316.39
7.2.140.0090.01216.58
7.2.130.0090.00916.24
7.2.120.0070.01016.19
7.2.110.0110.00716.27
7.2.100.0380.00616.22
7.2.90.0130.00316.38
7.2.80.0180.00016.22
7.2.70.0160.00316.39
7.2.60.0120.00816.27
7.2.50.0100.01316.04
7.2.40.0080.01416.31
7.2.30.0140.00816.52
7.2.20.0070.01116.42
7.2.10.0170.00316.47
7.2.00.0000.01716.33

preferences:
60.97 ms | 1515 KiB | 5 Q