3v4l.org

run code in 300+ PHP versions simultaneously
<?php //declare(strict_types = 1); function hello(string $s) : void { echo "$s\n"; } function fourtyTwo() : int { // returning wrong type return "42"; } // calling with wrong type try { hello(1234); } catch (Throwable $t) { echo $t; } try { echo fourtyTwo(); } catch (Throwable $t) { echo $t; }

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.70.0120.00618.18
8.3.60.0140.00416.75
8.3.50.0130.00416.46
8.3.40.0110.01118.82
8.3.30.0110.00418.89
8.3.20.0040.00420.33
8.3.10.0040.00423.65
8.3.00.0080.00322.09
8.2.180.0110.01118.25
8.2.170.0000.01522.96
8.2.160.0070.00718.96
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0090.00921.13
8.2.120.0110.00426.35
8.2.110.0070.00320.96
8.2.100.0070.00318.09
8.2.90.0080.00018.93
8.2.80.0030.00517.97
8.2.70.0000.00917.75
8.2.60.0050.00317.80
8.2.50.0030.00618.10
8.2.40.0000.00920.59
8.2.30.0000.00719.06
8.2.20.0050.00217.90
8.2.10.0040.00418.06
8.2.00.0040.00417.97
8.1.280.0140.00325.92
8.1.270.0040.00422.06
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0060.00323.92
8.1.230.0070.00418.98
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.13
8.1.190.0000.00817.13
8.1.180.0030.00618.10
8.1.170.0000.00718.66
8.1.160.0030.00318.95
8.1.150.0040.00420.46
8.1.140.0030.00519.35
8.1.130.0050.00218.77
8.1.120.0000.00717.38
8.1.110.0040.00417.25
8.1.100.0000.00717.24
8.1.90.0040.00417.35
8.1.80.0040.00417.24
8.1.70.0000.00717.39
8.1.60.0060.00317.53
8.1.50.0050.00217.43
8.1.40.0040.00417.32
8.1.30.0090.00017.51
8.1.20.0030.00517.48
8.1.10.0040.00417.53
8.1.00.0000.00717.36
8.0.300.0060.00318.77
8.0.290.0040.00416.75
8.0.280.0000.00818.36
8.0.270.0030.00317.32
8.0.260.0050.00316.76
8.0.250.0030.00317.02
8.0.240.0070.00017.06
8.0.230.0070.00017.02
8.0.220.0030.00316.99
8.0.210.0030.00316.97
8.0.200.0060.00017.01
8.0.190.0050.00316.99
8.0.180.0030.00716.95
8.0.170.0070.00017.02
8.0.160.0030.00316.99
8.0.150.0000.00716.84
8.0.140.0000.00716.79
8.0.130.0030.00313.34
8.0.120.0080.00016.98
8.0.110.0070.00016.78
8.0.100.0070.00016.84
8.0.90.0020.00516.94
8.0.80.0210.00016.93
8.0.70.0040.00416.97
8.0.60.0000.00716.78
8.0.50.0000.00816.82
8.0.30.0090.00917.12
8.0.20.0140.00617.40
8.0.10.0040.00416.97
8.0.00.0120.01016.64
7.4.330.0050.00015.55
7.4.320.0030.00316.43
7.4.300.0060.00016.33
7.4.290.0000.00716.53
7.4.280.0030.00516.55
7.4.270.0070.00016.54
7.4.260.0050.00013.20
7.4.250.0070.00016.39
7.4.240.0040.00416.43
7.4.230.0000.00716.34
7.4.220.0060.01216.52
7.4.210.0090.00616.57
7.4.200.0000.00716.38
7.4.160.0100.00616.47
7.4.150.0120.00617.40
7.4.140.0100.00917.86
7.4.130.0110.00816.63
7.4.120.0070.01116.38
7.3.330.0050.00313.15
7.3.320.0050.00013.29
7.3.310.0000.00716.18
7.3.300.0030.00316.29
7.3.290.0080.01016.29
7.3.280.0070.00916.27
7.3.270.0070.01017.40
7.3.260.0180.02016.41
7.3.250.0070.01116.43
7.3.240.0050.01516.46
7.1.70.0240.01015.41

preferences:
38.44 ms | 401 KiB | 5 Q