3v4l.org

run code in 300+ PHP versions simultaneously
<?php $from = -2; $to = 6; $segments = 20; $f = function($x) { return ($x ** 2) + (2 * $x) + 3; }; $step = ($to - $from) / $segments; $A = 0; for ($x = $from + ($step / 2); $x < $to; $x += $step) { $A += $f($x) * $step; } echo $A;

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.0000.01518.56
8.3.50.0120.00316.61
8.3.40.0140.00419.08
8.3.30.0040.01119.14
8.3.20.0040.00419.53
8.3.10.0050.00322.15
8.3.00.0040.00419.14
8.2.180.0120.01216.63
8.2.170.0120.00319.29
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0050.00324.66
8.2.130.0040.00720.14
8.2.120.0050.00326.35
8.2.110.0000.00820.63
8.2.100.0030.00918.22
8.2.90.0000.00818.13
8.2.80.0080.00017.97
8.2.70.0040.00418.29
8.2.60.0000.00818.47
8.2.50.0040.00418.10
8.2.40.0000.00820.48
8.2.30.0040.00419.45
8.2.20.0070.00018.23
8.2.10.0000.00718.40
8.2.00.0040.00418.01
8.1.280.0110.00425.92
8.1.270.0030.00522.43
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0050.00524.08
8.1.230.0060.00619.41
8.1.220.0040.00418.04
8.1.210.0050.00318.77
8.1.200.0000.00917.37
8.1.190.0030.00517.25
8.1.180.0060.00618.10
8.1.170.0040.00418.81
8.1.160.0050.00319.05
8.1.150.0040.00420.51
8.1.140.0040.00419.85
8.1.130.0030.00317.91
8.1.120.0000.00717.56
8.1.110.0080.00017.77
8.1.100.0000.00817.64
8.1.90.0050.00317.72
8.1.80.0030.00317.71
8.1.70.0000.00717.77
8.1.60.0030.00517.84
8.1.50.0040.00417.75
8.1.40.0060.00317.71
8.1.30.0040.00417.89
8.1.20.0020.00517.86
8.1.10.0050.00317.73
8.1.00.0040.00417.70
8.0.300.0080.00021.77
8.0.290.0070.00016.88
8.0.280.0000.00718.67
8.0.270.0040.00417.30
8.0.260.0040.00417.52
8.0.250.0000.00617.27
8.0.240.0040.00417.20
8.0.230.0000.00717.16
8.0.220.0030.00317.00
8.0.210.0000.00717.20
8.0.200.0030.00617.04
8.0.190.0080.00017.19
8.0.180.0000.00717.11
8.0.170.0070.00317.14
8.0.160.0000.00816.99
8.0.150.0070.00017.01
8.0.140.0040.00417.03
8.0.130.0040.00213.54
8.0.120.0060.00317.18
8.0.110.0040.00416.96
8.0.100.0040.00417.20
8.0.90.0030.00517.20
8.0.80.0060.01017.00
8.0.70.0070.00017.20
8.0.60.0080.00017.17
8.0.50.0000.00716.96
8.0.30.0100.00917.13
8.0.20.0120.01017.40
8.0.10.0030.00617.30
8.0.00.0070.01016.82
7.4.330.0000.00515.55
7.4.320.0000.00616.87
7.4.300.0030.00316.82
7.4.290.0070.00316.82
7.4.280.0060.00316.75
7.4.270.0030.00316.71
7.4.260.0030.00616.84
7.4.250.0050.00216.85
7.4.240.0000.00916.63
7.4.230.0000.00716.87
7.4.220.0080.00916.70
7.4.210.0060.00916.69
7.4.200.0070.00016.63
7.4.160.0080.00816.62
7.4.150.0080.01117.40
7.4.140.0120.01217.86
7.4.130.0100.00816.64
7.4.120.0130.00516.62
7.4.110.0100.00716.48
7.4.100.0140.00416.45
7.4.90.0130.00916.78
7.4.80.0040.01319.39
7.4.70.0100.00916.69
7.4.60.0090.00616.64
7.4.50.0040.01216.86
7.4.40.0070.01016.68
7.4.30.0100.00716.57
7.4.00.0100.00715.06
7.3.330.0050.00013.58
7.3.320.0030.00313.48
7.3.310.0070.00016.63
7.3.300.0030.00316.62
7.3.290.0050.01016.49
7.3.280.0100.01016.49
7.3.270.0080.00817.40
7.3.260.0100.00716.69
7.3.250.0090.00816.53
7.3.240.0100.01116.79
7.3.230.0120.00616.70
7.3.210.0030.01316.54
7.3.200.0130.00816.71
7.3.190.0090.00616.50
7.3.180.0040.01216.64
7.3.170.0150.00616.75
7.3.160.0090.00916.55
7.2.330.0100.00716.52
7.2.320.0110.00816.92
7.2.310.0160.00016.65
7.2.300.0090.00916.88
7.2.290.0130.00816.99
7.2.110.0100.01316.92
7.2.60.0230.00516.71
7.1.200.0080.00415.66
7.1.70.0030.00517.47
7.1.60.0060.00617.09
7.1.00.0130.05322.67
7.0.200.0000.01016.92
7.0.130.0130.07722.28
7.0.120.0170.07022.10
7.0.110.0100.05722.27
7.0.100.0130.06022.26
7.0.90.0070.07322.08
7.0.80.0100.06322.19
7.0.70.0170.06022.07
7.0.60.0100.06022.27
7.0.50.0070.06322.31
7.0.40.0100.06022.32
7.0.30.0470.05720.34
7.0.20.0030.08322.08
7.0.10.0100.07722.25
7.0.00.0070.06322.13
5.6.280.0170.07720.88
5.6.270.0130.05721.09
5.6.260.0130.06021.28
5.6.250.0130.05321.07
5.6.240.0100.06021.24
5.6.230.0070.08321.01
5.6.220.0100.07721.13
5.6.210.0100.06021.16
5.6.200.0130.06021.20
5.6.190.0070.06721.23
5.6.180.0130.05721.20
5.6.170.0170.07021.20
5.6.160.0030.07021.18
5.6.150.0000.08321.18
5.6.140.0100.05720.91
5.6.130.0070.06021.15
5.6.120.0100.05721.14
5.6.110.0070.06020.86
5.6.100.0170.05021.20
5.6.90.0130.05021.19
5.6.80.0030.06020.41
5.6.70.0170.05020.57
5.6.60.0100.05320.61
5.6.50.0100.05720.57
5.6.40.0070.06020.55
5.6.30.0070.07020.20
5.6.20.0000.06720.53
5.6.10.0030.06020.21
5.6.00.0070.05320.50

preferences:
65.45 ms | 400 KiB | 5 Q