3v4l.org

run code in 300+ PHP versions simultaneously
<?php try { 10 / 0; } catch (\DivisionByZeroError $e) { printf("%d: %s\n", __LINE__, $e->getMessage()); } try { $null->var = false; } catch (\Error $e) { printf("%d: %s\n", __LINE__, $e->getMessage()); } try { $i = 100; $i[] = 'd'; } catch (\Error $e) { printf("%d: %s\n", __LINE__, $e->getMessage()); } try { [''][new stdClass]; } catch (\TypeError $e) { printf("%d: %s\n", __LINE__, $e->getMessage()); } try { $s = 'abc'; $s[''] = 'd'; } catch (\TypeError $e) { printf("%d: %s\n", __LINE__, $e->getMessage()); } try { echo UNDEF_CONST; } catch (\Error $e) { printf("%d: %s\n", __LINE__, $e->getMessage()); }

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.0060.00916.86
8.3.50.0140.00316.45
8.3.40.0180.00318.83
8.3.30.0090.00618.79
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0000.00826.16
8.2.180.0090.00625.92
8.2.170.0140.00318.92
8.2.160.0100.01022.96
8.2.150.0040.00425.66
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0080.00020.80
8.2.110.0030.00720.90
8.2.100.0040.00717.84
8.2.90.0030.00617.97
8.2.80.0090.00019.20
8.2.70.0000.00817.63
8.2.60.0030.00518.05
8.2.50.0080.00018.07
8.2.40.0000.00818.26
8.2.30.0050.00318.15
8.2.20.0070.00018.14
8.2.10.0050.00319.34
8.2.00.0000.00719.37
8.1.280.0040.01125.92
8.1.270.0070.00024.02
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0100.00022.60
8.1.230.0080.00321.04
8.1.220.0030.00617.91
8.1.210.0050.00318.95
8.1.200.0030.00617.48
8.1.190.0040.00417.22
8.1.180.0030.00618.10
8.1.170.0050.00318.82
8.1.160.0000.00818.83
8.1.150.0070.00018.97
8.1.140.0080.00018.84
8.1.130.0070.00020.22
8.1.120.0040.00417.41
8.1.110.0000.00817.37
8.1.100.0040.00417.43
8.1.90.0000.00817.45
8.1.80.0090.00017.46
8.1.70.0040.00417.39
8.1.60.0080.00017.57
8.1.50.0080.00017.55
8.1.40.0000.01217.51
8.1.30.0060.00317.69
8.1.20.0030.00617.52
8.1.10.0040.00417.66
8.1.00.0030.00617.41
8.0.300.0040.00419.89
8.0.290.0070.00016.75
8.0.280.0040.00418.51
8.0.270.0070.00018.05
8.0.260.0030.00318.51
8.0.250.0030.00317.08
8.0.240.0000.00717.04
8.0.230.0000.00716.96
8.0.220.0030.00317.04
8.0.210.0000.00816.89
8.0.200.0070.00016.88
8.0.190.0040.00417.02
8.0.180.0040.00416.89
8.0.170.0040.00416.88
8.0.160.0040.00416.89
8.0.150.0000.00716.92
8.0.140.0030.00616.82
8.0.130.0060.00013.50
8.0.120.0000.00816.84
8.0.110.0040.00417.03
8.0.100.0040.00417.04
8.0.90.0040.00417.05
8.0.80.0100.00616.88
8.0.70.0040.00417.04
8.0.60.0050.00316.87
8.0.50.0080.00017.06
8.0.30.0030.01216.98
8.0.20.0060.01117.03
8.0.10.0070.01017.12
8.0.00.0070.01017.05
7.4.330.0050.00015.55
7.4.320.0030.00316.65
7.4.300.0000.00716.56
7.4.290.0000.00716.59
7.4.280.0080.00016.44
7.4.270.0030.00316.68
7.4.260.0030.00313.30
7.4.250.0000.00716.54
7.4.240.0040.00416.44
7.4.230.0000.00716.60
7.4.220.0040.00416.48
7.4.210.0110.00516.64
7.4.200.0000.00816.61
7.4.160.0080.00716.68
7.4.150.0040.01316.54
7.4.140.0120.00516.48
7.4.130.0060.00916.51
7.4.120.0120.00416.47
7.4.110.0090.00716.65
7.4.100.0070.00916.46
7.4.90.0100.00716.53
7.4.80.0080.01016.44
7.4.70.0050.01316.58
7.4.60.0060.01516.59
7.4.50.0130.00816.49
7.4.40.0110.00916.43
7.4.30.0090.00916.56
7.4.20.0080.01116.61
7.4.10.0060.01416.44
7.4.00.0070.00816.54
7.3.330.0060.00316.50
7.3.320.0000.00513.20
7.3.310.0030.00316.39
7.3.300.0030.00316.44
7.3.290.0030.00316.25
7.3.270.0060.00816.33
7.3.260.0090.00716.43
7.3.250.0080.00716.37
7.3.240.0100.00716.31
7.3.230.0070.01416.39
7.3.220.0050.01016.36
7.3.210.0100.00916.29
7.3.200.0110.00916.33
7.3.190.0080.01316.35
7.3.180.0120.00716.25
7.3.170.0100.01116.26
7.3.160.0060.01216.32
7.3.150.0060.01116.33
7.3.140.0110.00916.35
7.3.130.0060.01116.33
7.3.120.0110.00616.29
7.3.110.0060.01016.22
7.3.100.0110.00616.14
7.3.90.0070.01216.61
7.3.80.0030.01516.38
7.3.70.0100.00716.31
7.3.60.0100.00816.41
7.3.50.0100.00916.42
7.3.40.0100.00916.43
7.3.30.0060.01316.32
7.3.20.0090.00916.37
7.3.10.0050.01216.38
7.3.00.0020.01516.36

preferences:
42.71 ms | 400 KiB | 5 Q