3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private ?int $foo; private ?int $bar = 1; private ?int $baz = null; public function propertyInitialized($name): bool { if (property_exists($this, $name)) { try { return $this->$name === null || $this->$name !== null; } Catch(Error $e) { return false; } } else { return false; } } } $foo = new foo; var_dump($foo->propertyInitialized('foo'), $foo->propertyInitialized('bar'), $foo->propertyInitialized('baz'), $foo->propertyInitialized('doesNotExist'));

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.60.0030.01716.38
8.3.50.0100.01016.59
8.3.40.0040.01118.79
8.3.30.0060.01518.70
8.3.20.0050.00221.78
8.3.10.0080.00021.90
8.3.00.0080.00021.94
8.2.180.0140.00718.54
8.2.170.0130.00322.96
8.2.160.0070.01022.02
8.2.150.0030.00624.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00826.16
8.2.110.0100.00019.21
8.2.100.0070.00618.03
8.2.90.0040.00419.21
8.2.80.0030.00617.97
8.2.70.0030.00617.75
8.2.60.0030.00518.05
8.2.50.0090.00018.07
8.2.40.0030.00618.28
8.2.30.0070.00019.33
8.2.20.0040.00418.14
8.2.10.0040.00419.27
8.2.00.0000.00719.27
8.1.280.0110.00425.92
8.1.270.0040.00722.19
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.72
8.1.230.0040.00717.77
8.1.220.0080.00017.76
8.1.210.0040.00418.77
8.1.200.0100.00017.35
8.1.190.0030.00617.36
8.1.180.0030.00518.10
8.1.170.0060.00318.50
8.1.160.0000.00718.97
8.1.150.0080.00018.91
8.1.140.0040.00420.78
8.1.130.0000.00720.24
8.1.120.0000.00817.52
8.1.110.0040.00417.36
8.1.100.0000.00717.48
8.1.90.0050.00217.36
8.1.80.0040.00417.38
8.1.70.0030.00317.48
8.1.60.0030.00517.57
8.1.50.0040.00417.59
8.1.40.0000.00917.42
8.1.30.0000.00817.67
8.1.20.0000.00817.70
8.1.10.0000.00717.66
8.1.00.0000.00817.53
8.0.300.0040.00418.77
8.0.290.0050.00216.75
8.0.280.0030.00318.48
8.0.270.0000.00718.09
8.0.260.0000.00620.00
8.0.250.0000.00617.05
8.0.240.0060.00317.05
8.0.230.0000.00717.05
8.0.220.0040.00216.90
8.0.210.0050.00316.95
8.0.200.0030.00317.05
8.0.190.0040.00417.02
8.0.180.0040.00416.87
8.0.170.0080.00317.02
8.0.160.0080.00017.00
8.0.150.0050.00216.95
8.0.140.0000.00716.86
8.0.130.0000.00613.40
8.0.120.0040.00416.84
8.0.110.0070.00016.86
8.0.100.0000.00716.80
8.0.90.0060.00316.95
8.0.80.0050.01516.95
8.0.70.0070.00016.85
8.0.60.0070.00017.02
8.0.50.0000.00717.02
8.0.30.0090.00916.89
8.0.20.0120.01517.44
8.0.10.0000.00717.08
8.0.00.0070.01116.80
7.4.330.0030.00316.76
7.4.320.0000.00616.45
7.4.300.0030.00316.68
7.4.290.0030.00316.60
7.4.280.0040.00416.62
7.4.270.0080.00016.63
7.4.260.0000.00713.20
7.4.250.0070.00016.50
7.4.240.0000.00716.60
7.4.230.0000.00716.63
7.4.220.0040.00416.57
7.4.210.0070.00916.58
7.4.200.0070.00016.73
7.4.130.0180.00716.50
7.4.120.0100.00716.63
7.4.110.0070.01016.68
7.4.100.0040.01216.43
7.4.90.0030.01716.74
7.4.80.0140.00719.39
7.4.70.0070.01316.51
7.4.60.0040.01216.39
7.4.50.0030.01416.55
7.4.40.0110.01216.55
7.4.20.0070.01116.38
7.4.10.0150.00316.51
7.4.00.0060.01116.50
7.3.330.0000.00616.09
7.3.320.0050.00012.97
7.3.310.0030.00316.14
7.3.300.0060.00016.19
7.3.290.0060.00916.18
7.3.280.0070.00716.10
7.3.260.0070.01216.22
7.3.240.0110.00916.31
7.3.230.0130.00416.36
7.3.210.0080.01116.07
7.3.200.0100.00716.46
7.3.190.0090.00816.36
7.3.180.0140.00716.24
7.3.170.0110.00916.27
7.3.160.0060.00916.21
7.3.130.0120.00916.23
7.3.120.0060.01016.19
7.3.110.0070.01016.16
7.3.100.0090.01216.21
7.3.90.0120.01016.34
7.3.80.0180.00616.23
7.3.70.0190.00316.23
7.3.60.0060.01716.23
7.3.50.0160.00016.12
7.3.40.0060.00916.22
7.3.30.0190.00016.28
7.3.20.0050.01416.22
7.3.10.0150.00616.21
7.3.00.0060.01216.10
7.2.330.0090.01516.52
7.2.320.0100.00716.34
7.2.310.0030.01316.43
7.2.300.0110.01016.22
7.2.290.0090.00616.28
7.2.260.0100.01316.43
7.2.250.0070.01316.46
7.2.240.0060.01316.32
7.2.230.0170.00316.48
7.2.220.0110.00816.46
7.2.210.0160.00416.38
7.2.200.0130.01316.30
7.2.190.0100.01016.27
7.2.180.0030.01416.16
7.2.170.0090.00916.40
7.2.160.0130.00316.20
7.2.150.0130.00616.27
7.2.140.0110.01116.39
7.2.130.0000.02416.57
7.2.120.0210.00916.20
7.2.110.0160.00316.13
7.2.100.0130.00916.21
7.2.90.0110.01116.27
7.2.80.0180.00716.34
7.2.70.0100.01016.37
7.2.60.0040.01616.38
7.2.50.0060.01616.36
7.2.40.0080.01116.47
7.2.30.0180.00516.29
7.2.20.0150.00816.39
7.2.10.0080.01616.33
7.2.00.0090.01516.55

preferences:
61.17 ms | 400 KiB | 5 Q