3v4l.org

run code in 300+ PHP versions simultaneously
<?php function divide(float $dividend, float $divisor): float { if ($divisor === 0.) { throw throw throw throw throw throw new Exception("Division by zero"); } return $dividend / $divisor; } echo divide(5, 0);

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.4.120.0100.00620.47
8.4.110.0050.00422.30
8.4.100.0060.00417.82
8.4.90.0120.00919.86
8.4.80.0060.00717.68
8.4.70.0120.00817.80
8.4.60.0110.00918.59
8.4.50.0040.00518.03
8.4.40.0110.00018.05
8.4.30.0130.00618.66
8.4.20.0160.00622.36
8.4.10.0000.01022.07
8.3.250.0120.00718.79
8.3.240.0120.00416.55
8.3.230.0090.00916.66
8.3.220.0130.00617.07
8.3.210.0120.00716.54
8.3.200.0030.00616.73
8.3.190.0050.00419.05
8.3.180.0090.01118.23
8.3.170.0110.00718.87
8.3.160.0140.00417.09
8.3.150.0150.00317.21
8.3.140.0190.00016.72
8.3.130.0110.00018.57
8.3.120.0100.01019.00
8.3.110.0090.00020.94
8.3.100.0040.00424.06
8.3.90.0090.00626.77
8.3.80.0070.00416.73
8.3.70.0090.01216.63
8.3.60.0090.00616.75
8.3.50.0140.00019.97
8.3.40.0070.01020.47
8.3.30.0110.00418.84
8.3.20.0040.00424.18
8.3.10.0070.00024.66
8.3.00.0080.00026.16
8.2.290.0090.00920.54
8.2.280.0080.00418.36
8.2.270.0090.00017.16
8.2.260.0120.00616.71
8.2.250.0040.00418.56
8.2.240.0050.00318.77
8.2.230.0000.00822.58
8.2.220.0080.00037.54
8.2.210.0080.00026.77
8.2.200.0040.00418.29
8.2.190.0070.01116.75
8.2.180.0040.01125.92
8.2.170.0110.00419.04
8.2.160.0100.00322.96
8.2.150.0030.00625.66
8.2.140.0030.00524.66
8.2.130.0050.00326.16
8.2.120.0040.00419.01
8.2.110.0030.00620.52
8.2.100.0040.00817.72
8.2.90.0040.00419.34
8.2.80.0030.00618.22
8.2.70.0050.00317.50
8.2.60.0040.00417.77
8.2.50.0030.00618.07
8.2.40.0060.00318.09
8.2.30.0070.00017.89
8.2.20.0040.00419.19
8.2.10.0000.00718.12
8.2.00.0050.00219.12
8.1.330.0100.00818.54
8.1.320.0110.00916.32
8.1.310.0080.00018.34
8.1.300.0040.00416.11
8.1.290.0040.00430.84
8.1.280.0070.00725.92
8.1.270.0040.00424.66
8.1.260.0030.01226.35
8.1.250.0040.00428.09
8.1.240.0060.00322.51
8.1.230.0070.00422.73
8.1.220.0060.00317.74
8.1.210.0050.00318.77
8.1.200.0080.00017.35
8.1.190.0000.00817.35
8.1.180.0000.00818.10
8.1.170.0000.00818.59
8.1.160.0040.00418.81
8.1.150.0000.01018.53
8.1.140.0000.01017.26
8.1.130.0040.00420.61
8.1.120.0040.00417.38
8.1.110.0000.00917.36
8.1.100.0080.00817.35
8.1.90.0130.00417.37
8.1.80.0170.00017.25
8.1.70.0130.00317.37
8.1.60.0120.00717.46
8.1.50.0160.00417.34
8.1.40.0140.00317.34
8.1.30.0060.01217.64
8.1.20.0100.00717.56
8.1.10.0120.00517.39
8.1.00.0180.00017.40
8.0.300.0070.00019.87
8.0.290.0040.00416.63
8.0.280.0060.00318.38
8.0.270.0070.00018.06
8.0.260.0040.00418.32
8.0.250.0030.00316.97
8.0.240.0070.00716.89
8.0.230.0080.00816.92
8.0.220.0140.00016.90
8.0.210.0060.00916.71
8.0.200.0100.00516.82
8.0.190.0150.00016.95
8.0.180.0120.00416.88
8.0.170.0140.00016.88
8.0.160.0120.00416.80
8.0.150.0150.00216.89
8.0.140.0120.00316.77
8.0.130.0100.00616.76
8.0.120.0120.00416.93
8.0.110.0110.00417.00
8.0.100.0050.01116.90
8.0.90.0170.00016.97
8.0.80.0120.00316.82
8.0.70.0130.00316.78
8.0.60.0040.00816.78
8.0.50.0060.00616.80
8.0.30.0120.00416.95
8.0.20.0080.00816.96
8.0.10.0170.00016.88
7.4.330.0000.00615.55
7.4.320.0000.00716.30
7.4.300.0040.00816.21
7.4.290.0040.00916.26
7.4.280.0120.00416.45
7.4.270.0080.00616.36
7.4.260.0100.00316.29
7.4.250.0050.00816.26
7.4.240.0110.00416.45
7.4.230.0090.00216.37
7.4.220.0100.00316.27
7.4.210.0130.00016.32
7.4.200.0090.00516.35
7.4.190.0110.00416.34
7.4.180.0120.00316.50
7.4.160.0120.00216.42
7.4.150.0120.00316.34
7.4.140.0070.00716.17
7.4.130.0030.01216.34
7.4.120.0040.01216.21
7.4.110.0100.00416.23
7.4.100.0140.00016.34
7.4.90.0120.00016.23
7.4.80.0150.00016.11
7.4.70.0070.00716.11
7.4.60.0080.00416.16
7.4.50.0070.00716.11
7.4.40.0090.00516.11
7.4.30.0040.00816.22
7.4.20.0100.00516.27
7.4.10.0100.00015.91
7.4.00.0000.00815.98

preferences:
28.91 ms | 403 KiB | 5 Q