3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); function AddIntAndFloat(int $a, float $b): int { return (string) $a + $b; } try { echo AddIntAndFloat(1.4,'2'); } catch(TypeError $e) { echo $e->getMessage(), PHP_EOL; } try { echo AddIntAndFloat(1,'2'); } catch(TypeError $e) { echo $e->getMessage(), PHP_EOL; } try { echo AddIntAndFloat(1,1); } catch(TypeError $e) { echo $e->getMessage(), PHP_EOL; }

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.140.0080.00016.60
8.3.130.0080.00018.59
8.3.120.0130.00720.52
8.3.110.0110.00316.13
8.3.100.0030.00624.06
8.3.90.0030.00626.77
8.3.80.0060.00318.18
8.3.70.0180.00416.75
8.3.60.0110.01118.55
8.3.50.0110.00718.26
8.3.40.0160.00718.73
8.3.30.0070.00718.73
8.3.20.0000.00821.62
8.3.10.0050.00221.76
8.3.00.0040.00421.54
8.2.260.0110.00418.41
8.2.250.0040.00417.03
8.2.240.0040.00717.46
8.2.230.0060.00320.94
8.2.220.0030.00637.54
8.2.210.0100.00726.77
8.2.200.0030.00618.54
8.2.190.0060.00916.58
8.2.180.0130.00625.92
8.2.170.0110.00418.96
8.2.160.0100.00722.96
8.2.150.0080.00025.66
8.2.140.0100.00724.66
8.2.130.0070.00026.16
8.2.120.0040.00421.03
8.2.110.0100.00019.30
8.2.100.0060.00617.84
8.2.90.0030.00617.75
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0090.00617.43
8.2.50.0080.00617.79
8.2.40.0100.00317.77
8.2.30.0060.00618.07
8.2.20.0090.00417.66
8.2.10.0040.00818.29
8.2.00.0060.00617.76
8.1.300.0070.00318.36
8.1.290.0000.00818.88
8.1.280.0150.00625.92
8.1.270.0060.00322.16
8.1.260.0050.00326.35
8.1.250.0000.00828.09
8.1.240.0000.01021.36
8.1.230.0080.00420.88
8.1.220.0050.00317.74
8.1.210.0000.00918.77
8.1.200.0000.01217.23
8.1.190.0050.00317.39
8.1.180.0100.00217.54
8.1.170.0070.00717.90
8.1.160.0070.00517.87
8.1.150.0070.00417.87
8.1.140.0050.00717.88
8.1.130.0080.00418.09
8.1.120.0070.00517.21
8.1.110.0100.00417.21
8.1.100.0060.00617.29
8.1.90.0090.00417.23
8.1.80.0090.00417.22
8.1.70.0080.00517.31
8.1.60.0080.00717.50
8.1.50.0110.00417.42
8.1.40.0080.00717.41
8.1.30.0070.00717.53
8.1.20.0110.00417.52
8.1.10.0100.00517.44
8.1.00.0110.00517.40
8.0.300.0070.00021.52
8.0.290.0040.00416.75
8.0.280.0050.00717.50
8.0.270.0070.00516.76
8.0.260.0030.00816.64
8.0.250.0050.00716.90
8.0.240.0100.00116.77
8.0.230.0110.00216.73
8.0.220.0090.00416.75
8.0.210.0070.00516.78
8.0.200.0070.00616.88
8.0.190.0090.00416.86
8.0.180.0080.00616.78
8.0.170.0110.00116.78
8.0.160.0090.00616.79
8.0.150.0110.00516.71
8.0.140.0090.00616.71
8.0.130.0110.00416.24
8.0.120.0100.00516.76
8.0.110.0110.00316.75
8.0.100.0110.00416.72
8.0.90.0110.00416.76
8.0.80.0120.00416.79
8.0.70.0110.00416.74
8.0.60.0100.00416.73
8.0.50.0110.00316.76
8.0.30.0100.00716.81
8.0.20.0100.00616.90
8.0.10.0100.00616.94
8.0.00.0100.00716.87
7.4.330.0080.00116.67
7.4.320.0050.00516.57
7.4.300.0050.00516.52
7.4.290.0120.00216.55
7.4.280.0070.00616.49
7.4.270.0130.00516.48
7.4.260.0100.00516.46
7.4.250.0100.00516.47
7.4.240.0130.00316.52
7.4.230.0110.00616.47
7.4.220.0070.00616.54
7.4.210.0120.00416.52
7.4.200.0090.00516.48
7.4.190.0100.00516.58
7.4.180.0120.00416.54
7.4.160.0110.00616.54
7.4.150.0120.00516.45
7.4.140.0110.00616.57
7.4.130.0100.00716.45
7.4.120.0100.00716.41
7.4.110.0100.00716.43
7.4.100.0090.00716.49
7.4.90.0110.00616.41
7.4.80.0110.00716.70
7.4.70.0120.00516.41
7.4.60.0090.00616.37
7.4.50.0100.00616.36
7.4.40.0090.00716.31
7.4.30.0110.00516.37
7.4.20.0130.00416.38
7.4.10.0100.00516.36
7.4.00.0100.00516.32
7.3.330.0100.00415.97
7.3.320.0120.00315.87
7.3.310.0110.00416.29
7.3.300.0090.00616.31
7.3.290.0120.00416.30
7.3.280.0100.00716.35
7.3.270.0130.00416.36
7.3.260.0100.00716.38
7.3.250.0090.00716.35
7.3.240.0110.00716.38
7.3.230.0100.00716.36
7.3.220.0120.00516.27
7.3.210.0120.00616.33
7.3.200.0120.00616.31
7.3.190.0120.00616.32
7.3.180.0110.00716.30
7.3.170.0110.00616.32
7.3.160.0130.00416.28
7.3.150.0100.00716.28
7.3.140.0120.00616.27
7.3.130.0110.00716.29
7.3.120.0100.00816.34
7.3.110.0130.00516.28
7.3.100.0090.00816.13
7.3.90.0120.00616.37
7.3.80.0100.00816.14
7.3.70.0130.00416.13
7.3.60.0090.00616.22
7.3.50.0100.00715.84
7.3.40.0100.00715.83
7.3.30.0100.00615.81
7.3.20.0110.00616.89
7.3.10.0140.00616.80
7.3.00.0100.00716.85
7.2.340.0130.00616.36
7.2.330.0140.00516.35
7.2.320.0130.00516.37
7.2.310.0130.00616.42
7.2.300.0120.00616.34
7.2.290.0130.00616.39
7.2.280.0130.00616.30
7.2.270.0150.00516.33
7.2.260.0120.00716.41
7.2.250.0140.00616.44
7.2.240.0110.00816.39
7.2.230.0120.00816.22
7.2.220.0120.00816.25
7.2.210.0120.00816.20
7.2.200.0100.00816.31
7.2.190.0130.00616.22
7.2.180.0120.00715.95
7.2.170.0110.00615.93
7.2.160.0090.00815.90
7.2.150.0110.00617.00
7.2.140.0110.00717.00
7.2.130.0150.00717.05
7.2.120.0110.00717.05
7.2.110.0120.00617.03
7.2.100.0120.00817.11
7.2.90.0120.00617.04
7.2.80.0130.00817.05
7.2.70.0110.00717.04
7.2.60.0100.00817.09
7.2.50.0110.00817.02
7.2.40.0130.00716.99
7.2.30.0110.00817.10
7.2.20.0120.00717.02
7.2.10.0120.00817.05
7.2.00.0120.00717.06
7.1.330.0130.00616.19
7.1.320.0120.00615.98
7.1.310.0120.00615.99
7.1.300.0120.00515.90
7.1.290.0190.00715.96
7.1.280.0100.00615.83
7.1.270.0090.00615.82
7.1.260.0100.00715.86
7.1.250.0120.00715.80
7.1.240.0110.00715.84
7.1.230.0120.00515.88
7.1.220.0100.00815.87
7.1.210.0110.00715.88
7.1.200.0110.00615.90
7.1.190.0120.00715.89
7.1.180.0110.00615.86
7.1.170.0120.00615.91
7.1.160.0130.00615.86
7.1.150.0130.00615.87
7.1.140.0110.00715.85
7.1.130.0130.00515.83
7.1.120.0170.00515.87
7.1.110.0110.00715.88
7.1.100.0110.00615.91
7.1.90.0090.00815.90
7.1.80.0130.00515.90
7.1.70.0150.00615.79
7.1.60.0130.00615.92
7.1.50.0120.00615.88
7.1.40.0110.00715.90
7.1.30.0130.00715.97
7.1.20.0110.00615.89
7.1.10.0130.00415.84
7.1.00.0110.00615.89

preferences:
51.72 ms | 403 KiB | 5 Q