3v4l.org

run code in 300+ PHP versions simultaneously
<?php class MethodCallClass { public function test(): array|null {} } class HelloWorld { /** @var MethodCallClass|null */ private $property = null; public function testCoalesce(): void { $this->property->test()['test'] ?? throw new Exception(); } public function testIseet(): void { isset($this->property->test()['test']) ? 'test' : throw new Exception(); } } (new HelloWorld())->testCoalesce(); //(new HelloWorld())->testIseet();

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.0120.00720.17
8.5.20.0130.00420.02
8.5.10.0090.00818.74
8.5.00.0130.00820.20
8.4.180.0130.00919.62
8.4.170.0150.00620.42
8.4.160.0120.01123.82
8.4.150.0030.00014.05
8.4.140.0140.00917.71
8.4.130.0120.00817.91
8.4.120.0100.00924.30
8.4.110.0120.00520.64
8.4.100.0060.00318.70
8.4.90.0120.00820.77
8.4.80.0100.01018.74
8.4.70.0070.00118.30
8.4.60.0100.01018.83
8.4.50.0120.00418.50
8.4.40.0060.00319.51
8.4.30.0100.00620.51
8.4.20.0130.00718.10
8.4.10.0160.00321.96
8.3.300.0070.01220.70
8.3.290.0040.00520.70
8.3.280.0120.00918.37
8.3.270.0110.00816.55
8.3.260.0120.00716.86
8.3.250.0070.01018.98
8.3.240.0120.00716.98
8.3.230.0120.00716.58
8.3.220.0060.01318.63
8.3.210.0090.00918.38
8.3.200.0070.00216.66
8.3.190.0140.00517.26
8.3.180.0080.00817.10
8.3.170.0130.00720.95
8.3.160.0110.00718.42
8.3.150.0130.00617.04
8.3.140.0060.01316.59
8.3.130.0030.00718.43
8.3.120.0120.00418.92
8.3.110.0120.00316.88
8.3.100.0040.00424.06
8.3.90.0030.00726.77
8.3.80.0060.00318.43
8.3.70.0070.01416.75
8.3.60.0120.00618.43
8.3.50.0070.01118.41
8.3.40.0140.00018.61
8.3.30.0120.00319.00
8.3.20.0000.00824.18
8.3.10.0050.00324.66
8.3.00.0080.00026.16
8.2.300.0120.00722.13
8.2.290.0140.00420.46
8.2.280.0110.00518.59
8.2.270.0100.01017.16
8.2.260.0000.00816.88
8.2.250.0060.00918.34
8.2.240.0000.00818.94
8.2.230.0030.00720.94
8.2.220.0060.00337.54
8.2.210.0070.01026.77
8.2.200.0050.00516.75
8.2.190.0110.00716.58
8.2.180.0100.01025.92
8.2.170.0110.00719.03
8.2.160.0070.00722.96
8.2.150.0030.00525.66
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0040.00426.16
8.2.110.0030.00620.34
8.2.100.0030.00717.78
8.2.90.0030.00517.59
8.2.80.0050.00521.02
8.2.70.0060.00317.50
8.2.60.0040.00417.38
8.2.50.0030.00617.98
8.2.40.0000.00718.03
8.2.30.0050.00217.91
8.2.20.0040.00420.48
8.2.10.0000.00717.98
8.2.00.0000.00919.16
8.1.340.0100.01217.86
8.1.330.0090.00822.09
8.1.320.0020.00716.23
8.1.310.0030.00616.16
8.1.300.0080.00820.07
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0030.00620.69
8.1.230.0070.00422.63
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0080.00017.22
8.1.190.0090.00017.23
8.1.180.0040.00418.10
8.1.170.0000.00817.62
8.1.160.0030.00518.75
8.1.150.0090.00018.43
8.1.140.0040.00417.23
8.1.130.0000.00718.70
8.1.120.0000.00817.32
8.1.110.0000.00817.18
8.1.100.0040.00417.33
8.1.90.0080.00017.35
8.1.80.0030.00817.34
8.1.70.0000.00717.30
8.1.60.0000.00817.48
8.1.50.0090.00317.36
8.1.40.0090.00017.36
8.1.30.0060.00617.37
8.1.20.0070.00317.45
8.1.10.0060.00617.45
8.1.00.0060.00617.24
8.0.300.0000.00719.98
8.0.290.0000.00816.63
8.0.280.0060.00318.37
8.0.270.0080.00016.90
8.0.260.0040.00418.38
8.0.250.0050.00216.91
8.0.240.0030.00316.90
8.0.230.0020.00516.96
8.0.220.0000.00716.92
8.0.210.0000.00816.88
8.0.200.0000.00716.86
8.0.190.0030.00616.84
8.0.180.0060.00316.71
8.0.170.0090.00416.86
8.0.160.0050.00516.77
8.0.150.0100.00016.73
8.0.140.0060.00616.64
8.0.130.0000.00916.67
8.0.120.0030.00616.84
8.0.110.0060.00616.82
8.0.100.0070.00316.69
8.0.90.0030.00616.73
8.0.80.0150.00016.50
8.0.70.0160.00516.63
8.0.60.0210.00016.76
8.0.50.0160.00416.56
8.0.30.0120.00816.42
8.0.20.0170.00416.56
8.0.10.0170.00416.31
7.4.330.0000.00615.55
7.4.320.0060.00016.45
7.4.300.0070.00016.43
7.4.290.0000.00816.35
7.4.280.0250.00016.23
7.4.270.0190.00316.08
7.4.260.0150.00616.05
7.4.250.0150.00816.27
7.4.240.0200.00016.12
7.4.230.0160.00616.37
7.4.220.0150.00615.78
7.4.210.0100.00516.12
7.4.200.0120.00616.27
7.4.190.0160.00016.02
7.4.180.0060.01215.90
7.4.160.0100.01016.33
7.4.150.0170.00315.97
7.4.140.0160.00515.95
7.4.130.0140.00615.87
7.4.120.0120.00715.72
7.4.110.0120.00815.75
7.4.100.0210.00215.79
7.4.90.0180.00015.97
7.4.80.0130.00615.84
7.4.70.0180.00415.89
7.4.60.0160.00315.55
7.4.50.0150.00415.47
7.4.40.0160.00215.94
7.4.30.0220.00015.69
7.4.20.0090.01415.98
7.4.10.0180.00015.76
7.4.00.0190.00015.70

preferences:
160.98 ms | 475 KiB | 5 Q