3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL|E_STRICT); function do_test(): int { try { 1/0; // a warning in php 7 - reported as documented nonexistent_function(); // a fatal error - not reported - program continues 1%0; // a fatal error return 0; } catch (Throwable $t) { printf("CATCH\n"); return 1; } finally { printf("FINALLY\n"); return 2; } return 3; } printf("%d\n", do_test());

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.0070.01418.33
8.3.50.0110.00716.28
8.3.40.0130.00721.71
8.3.30.0110.00418.83
8.3.20.0000.00724.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.180.0040.01125.92
8.2.170.0140.00018.95
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0050.00224.66
8.2.130.0060.00326.16
8.2.120.0000.00821.18
8.2.110.0030.00622.27
8.2.100.0080.00417.91
8.2.90.0000.00920.54
8.2.80.0000.00817.97
8.2.70.0000.00817.68
8.2.60.0080.00018.09
8.2.50.0050.00318.10
8.2.40.0000.00819.03
8.2.30.0050.00317.99
8.2.20.0000.00718.05
8.2.10.0050.00219.10
8.2.00.0040.00419.16
8.1.280.0100.01025.92
8.1.270.0040.00423.92
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0100.00022.38
8.1.230.0120.00020.99
8.1.220.0030.00517.74
8.1.210.0040.00418.85
8.1.200.0000.00917.23
8.1.190.0040.00417.23
8.1.180.0050.00318.10
8.1.170.0040.00418.60
8.1.160.0000.00718.87
8.1.150.0000.00718.88
8.1.140.0080.00018.77
8.1.130.0000.00720.08
8.1.120.0000.00717.41
8.1.110.0040.00417.35
8.1.100.0000.00717.25
8.1.90.0030.00517.38
8.1.80.0030.00617.37
8.1.70.0000.00717.29
8.1.60.0050.00317.50
8.1.50.0030.00617.52
8.1.40.0040.00417.56
8.1.30.0000.00817.65
8.1.20.0030.00617.48
8.1.10.0040.00417.55
8.1.00.0030.00617.48
8.0.300.0060.00319.86
8.0.290.0030.00516.75
8.0.280.0030.00318.25
8.0.270.0070.00017.91
8.0.260.0060.00318.55
8.0.250.0070.00016.94
8.0.240.0030.00316.84
8.0.230.0070.00016.97
8.0.220.0000.00716.84
8.0.210.0000.00816.90
8.0.200.0040.00416.85
8.0.190.0040.00416.95
8.0.180.0000.00716.91
8.0.170.0030.00616.80
8.0.160.0070.00016.82
8.0.150.0070.00016.80
8.0.140.0070.00316.84
8.0.130.0000.00613.40
8.0.120.0000.00816.70
8.0.110.0040.00416.95
8.0.100.0070.00016.95
8.0.90.0050.00216.85
8.0.80.0090.00616.89
8.0.70.0070.00016.73
8.0.60.0050.00216.85
8.0.50.0040.00416.73
8.0.30.0140.00417.37
8.0.20.0140.00616.98
8.0.10.0000.00717.12
8.0.00.0060.01216.89
7.4.330.0050.00015.55
7.4.320.0030.00316.54
7.4.300.0000.00616.55
7.4.290.0040.00416.42
7.4.280.0070.00316.49
7.4.270.0070.00016.65
7.4.260.0050.00013.27
7.4.250.0030.00316.47
7.4.240.0070.00016.50
7.4.230.0040.00416.40
7.4.220.0020.00516.50
7.4.210.0100.00716.58
7.4.200.0040.00416.50
7.4.130.0050.01316.47
7.4.120.0110.01016.49
7.4.110.0170.00016.46
7.4.100.0070.01016.50
7.4.90.0030.01316.22
7.4.80.0090.00616.46
7.4.70.0160.00616.38
7.4.60.0100.00716.54
7.4.50.0140.00316.31
7.4.40.0090.01216.54
7.4.30.0130.01016.41
7.4.20.0120.00916.46
7.4.10.0120.00916.50
7.4.00.0060.01216.47
7.3.330.0060.00416.35
7.3.320.0000.00613.12
7.3.310.0040.00416.21
7.3.300.0030.00316.30
7.3.290.0090.00916.33
7.3.260.0140.01016.36
7.3.250.0100.01316.35
7.3.240.0170.00316.24
7.3.230.0070.01416.19
7.3.220.0070.01016.27
7.3.210.0090.00916.46
7.3.200.0170.00616.23
7.3.190.0040.01316.31
7.3.180.0130.00616.50
7.3.170.0110.00816.29
7.3.160.0190.00016.25
7.3.150.0160.00316.43
7.3.140.0040.01216.35
7.3.130.0140.00516.29
7.3.120.0070.01116.13
7.3.110.0190.00316.16
7.3.100.0110.01216.17
7.3.90.0090.01816.23
7.3.80.0090.01616.39
7.3.70.0120.00916.34
7.3.60.0100.01416.18
7.3.50.0160.00316.31
7.3.40.0100.01016.18
7.3.30.0040.01516.09
7.3.20.0150.01216.19
7.3.10.0100.01016.16
7.3.00.0120.00616.32
7.2.340.0130.01016.65
7.2.330.0140.00716.61
7.2.320.0200.00016.68
7.2.310.0110.00816.54
7.2.300.0200.00316.41
7.2.290.0130.00816.57
7.2.280.0060.01716.64
7.2.270.0190.00416.72
7.2.260.0070.01016.73
7.2.250.0130.01016.68
7.2.240.0110.01516.58
7.2.230.0130.01316.43
7.2.220.0150.01216.48
7.2.210.0200.00616.53
7.2.200.0170.00816.46
7.2.190.0100.01016.36
7.2.180.0150.00816.34
7.2.170.0080.01216.55
7.2.160.0190.00316.37
7.2.150.0150.00616.33
7.2.140.0150.00616.36
7.2.130.0170.00816.49
7.2.120.0100.01016.54
7.2.110.0120.00916.48
7.2.100.0060.01316.63
7.2.90.0130.00616.59
7.2.80.0140.01016.59
7.2.70.0110.00816.67
7.2.60.0070.01116.65
7.2.50.0110.00816.63
7.2.40.0090.01116.16
7.2.30.0100.01216.28
7.2.20.0120.01216.58
7.2.10.0180.00716.37
7.2.00.0090.00916.67

preferences:
56.86 ms | 400 KiB | 5 Q