3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types = 1); class HelloWorld { public function sayHello(int|string $intOrString): void { try { $this->getInt($intOrString); } catch (TypeError) { } } /** @throws void */ public function getInt(int $int): int { return $int; } } (new HelloWorld())->sayHello('foo');

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.10.0120.00819.60
8.5.00.0120.01220.27
8.4.150.0030.00014.05
8.4.140.0110.00917.78
8.4.130.0120.00917.85
8.4.120.0090.01020.36
8.4.110.0100.00822.68
8.4.100.0140.00717.91
8.4.90.0080.00418.92
8.4.80.0020.00617.78
8.4.70.0100.01017.98
8.4.60.0130.00718.48
8.4.50.0050.00319.40
8.4.40.0120.00318.01
8.4.30.0130.00620.77
8.4.20.0110.00419.80
8.4.10.0040.00419.59
8.3.280.0020.00014.05
8.3.270.0070.01516.67
8.3.260.0110.00816.29
8.3.250.0120.00718.75
8.3.240.0110.00816.46
8.3.230.0130.00716.48
8.3.220.0090.01017.04
8.3.210.0150.00516.39
8.3.200.0040.00516.59
8.3.190.0130.00516.94
8.3.180.0090.00616.52
8.3.170.0060.01317.06
8.3.160.0080.00016.59
8.3.150.0040.01416.51
8.3.140.0080.00016.48
8.3.130.0100.00018.51
8.3.120.0060.00320.49
8.3.110.0270.01416.27
8.3.100.0340.01216.33
8.3.90.0380.00816.14
8.3.80.0470.00316.00
8.3.70.0350.01416.23
8.3.60.0400.01016.13
8.3.50.0310.01215.97
8.3.40.0310.00917.25
8.3.30.0360.01017.11
8.3.20.0420.00017.25
8.3.10.0300.01017.25
8.3.00.0230.00417.25
8.2.290.0070.00420.46
8.2.280.0040.00518.46
8.2.270.0030.00616.67
8.2.260.0140.00316.88
8.2.250.0040.01118.40
8.2.240.0060.00318.87
8.2.230.0300.00916.01
8.2.220.0310.01016.17
8.2.210.0330.00716.14
8.2.200.0310.01016.38
8.2.190.0300.01116.13
8.2.180.0340.00316.18
8.2.170.0350.00917.60
8.2.160.0410.00317.50
8.2.150.0380.00617.38
8.2.140.0330.01017.23
8.2.130.0390.01317.38
8.2.120.0350.01017.38
8.2.110.0390.00717.00
8.2.100.0310.01417.50
8.2.90.0290.01317.38
8.2.80.0260.01617.63
8.2.70.0430.00317.35
8.2.60.0290.00717.37
8.2.50.0450.00017.38
8.2.40.0350.00717.37
8.2.30.0320.00817.46
8.2.20.0350.00517.38
8.2.10.0320.01317.38
8.2.00.0260.00617.13
8.1.330.0120.00720.25
8.1.320.0070.00616.09
8.1.310.0060.00316.14
8.1.300.0090.00920.27
8.1.290.0280.01215.88
8.1.280.0400.00316.12
8.1.270.0380.00616.96
8.1.260.0380.00617.13
8.1.250.0280.01617.23
8.1.240.0310.00817.13
8.1.230.0300.00816.99
8.1.220.0210.01417.00
8.1.210.0270.00617.13
8.1.200.0290.01017.23
8.1.190.0210.01417.22
8.1.180.0240.00816.86
8.1.170.0240.00817.10
8.1.160.0220.01117.13
8.1.150.0160.01017.09
8.1.140.0370.00317.09
8.1.130.0370.00617.22
8.1.120.0260.00917.21
8.1.110.0290.00617.25
8.1.100.0230.01217.13
8.1.90.0310.00616.97
8.1.80.0280.01017.13
8.1.70.0240.01016.97
8.1.60.0270.00817.25
8.1.50.0380.00317.10
8.1.40.0320.01017.38
8.1.30.0400.00617.47
8.1.20.0340.01217.38
8.1.10.0300.01117.25
8.1.00.0320.01117.25

preferences:
33.98 ms | 403 KiB | 5 Q