3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test($f) { try { $f(); echo "No error?\n"; } catch (TypeError|ValueError $e) { if (strpos($e->getMessage(), '($WRONG_SCOPE_')) { echo "Bad error! ", $e->getMessage(), "\n"; } else { echo "Good error.\n"; } } } test(fn($WRONG_SCOPE_1 = 0, $WRONG_SCOPE_2 = 0) => gmp_init(1) < "x"); test(fn($WRONG_SCOPE_1 = 0, $WRONG_SCOPE_2 = 0) => gmp_init(1) < []); test(fn($WRONG_SCOPE_1 = 0, $WRONG_SCOPE_2 = 0) => gmp_init(1) + "x"); test(fn($WRONG_SCOPE_1 = 0, $WRONG_SCOPE_2 = 0) => gmp_init(1) + []);

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.0100.00718.56
8.3.50.0150.00916.29
8.3.40.0130.00718.84
8.3.30.0120.00918.64
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0040.00426.16
8.2.180.0100.00625.92
8.2.170.0110.00419.26
8.2.160.0060.00922.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0040.00420.93
8.2.110.0030.00621.18
8.2.100.0120.00018.03
8.2.90.0030.00617.90
8.2.80.0000.00819.13
8.2.70.0030.00618.05
8.2.60.0050.00318.22
8.2.50.0030.00718.10
8.2.40.0040.00421.18
8.2.30.0040.00419.35
8.2.20.0000.00818.07
8.2.10.0050.00219.31
8.2.00.0040.00419.37
8.1.280.0110.00425.92
8.1.270.0030.00523.99
8.1.260.0060.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00322.55
8.1.230.0070.00420.84
8.1.220.0030.00517.79
8.1.210.0040.00419.12
8.1.200.0070.00417.48
8.1.190.0040.00417.47
8.1.180.0030.00618.10
8.1.170.0080.00018.73
8.1.160.0060.00320.72
8.1.150.0040.00419.02
8.1.140.0000.00718.94
8.1.130.0070.00017.58
8.1.120.0050.00317.50
8.1.110.0040.00417.41
8.1.100.0040.00417.44
8.1.90.0040.00317.43
8.1.80.0030.00517.57
8.1.70.0030.00317.43
8.1.60.0040.00417.71
8.1.50.0060.00317.67
8.1.40.0080.00317.57
8.1.30.0000.00817.65
8.1.20.0040.00417.67
8.1.10.0000.00817.70
8.1.00.0030.00617.65
8.0.300.0030.00620.03
8.0.290.0040.00416.88
8.0.280.0040.00418.57
8.0.270.0000.00717.01
8.0.260.0070.00016.99
8.0.250.0040.00417.00
8.0.240.0000.00717.10
8.0.230.0030.00517.08
8.0.220.0030.00317.05
8.0.210.0030.00317.03
8.0.200.0030.00317.14
8.0.190.0070.00017.11
8.0.180.0040.00417.08
8.0.170.0040.00417.06
8.0.160.0030.00617.07
8.0.150.0000.00817.00
8.0.140.0040.00416.86
8.0.130.0030.00313.37
8.0.120.0000.00816.93
8.0.110.0050.00217.04
8.0.100.0040.00416.84
8.0.90.0070.00017.03
8.0.80.0100.00617.08
8.0.70.0040.00417.04
8.0.60.0050.00317.04
8.0.50.0040.00416.91
8.0.30.0100.00716.97
8.0.20.0110.00417.13
8.0.10.0110.00617.09
8.0.00.0120.01117.14
7.4.330.0020.00215.55
7.4.320.0000.00616.56
7.4.300.0000.00716.59
7.4.290.0070.00016.46
7.4.280.0080.00016.56
7.4.270.0080.00016.59
7.4.260.0000.00613.29
7.4.250.0040.00416.56
7.4.240.0070.00016.66
7.4.230.0030.00316.55
7.4.220.0000.00716.55
7.4.210.0080.00916.67
7.4.200.0030.00316.79
7.4.160.0070.00716.60
7.4.150.0060.00916.50
7.4.140.0040.01216.56
7.4.130.0080.00816.50
7.4.120.0030.01316.46
7.4.110.0100.01016.56
7.4.100.0060.00916.60
7.4.90.0170.00316.52
7.4.80.0120.00616.50
7.4.70.0070.01316.41
7.4.60.0070.00716.45
7.4.50.0090.01316.37
7.4.40.0130.01016.52
7.4.30.0090.00916.49
7.4.20.0070.01116.58
7.4.10.0060.01316.47
7.4.00.0110.00716.68
7.3.330.0030.00316.31
7.3.320.0040.00413.09
7.3.310.0000.00716.14
7.3.300.0000.00816.17
7.3.290.0050.00916.13
7.3.280.0000.01416.21
7.3.270.0120.00316.12
7.3.260.0030.01416.11
7.3.250.0100.00716.12
7.3.240.0120.00916.17
7.3.230.0090.01216.13
7.3.220.0080.00816.19
7.3.210.0060.01316.16
7.3.200.0160.00316.20
7.3.190.0130.00716.13
7.3.180.0040.01216.11
7.3.170.0070.01116.14
7.3.160.0000.01616.11
7.3.150.0040.01416.16
7.3.140.0060.00916.11
7.3.130.0030.01516.20
7.3.120.0070.01116.12
7.3.110.0090.00916.04
7.3.100.0030.01116.09
7.3.90.0100.00716.41
7.3.80.0060.01116.09
7.3.70.0100.00616.09
7.3.60.0000.01616.32
7.3.50.0100.00716.25
7.3.40.0070.01016.22
7.3.30.0030.01316.21
7.3.20.0070.00716.23
7.3.10.0040.01116.17
7.3.00.0060.00816.26

preferences:
68.53 ms | 401 KiB | 5 Q