3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Calculate; class calculator{ public function sum(...$args) { return array_sum($args); } public function init(){ return $this->sum(5, 10); } } $cal = new calculator(); print $cal->init(); // Expected Output is 15

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.0090.01020.77
8.4.110.0130.00418.81
8.4.100.0160.00517.68
8.4.90.0140.00617.81
8.4.80.0130.00622.57
8.4.70.0130.00718.12
8.4.60.0100.00920.50
8.4.50.0150.00623.87
8.4.40.0140.00617.39
8.4.30.0120.00620.86
8.4.20.0060.01317.71
8.4.10.0000.01023.92
8.3.250.0060.00218.84
8.3.240.0120.00816.63
8.3.230.0040.00816.66
8.3.220.0110.00717.05
8.3.210.0150.00416.23
8.3.200.0030.00616.53
8.3.190.0100.01017.15
8.3.180.0060.00316.38
8.3.170.0100.01016.96
8.3.160.0070.01020.77
8.3.150.0080.00018.31
8.3.140.0090.00017.05
8.3.130.0040.00418.53
8.3.120.0100.00020.66
8.3.110.0030.00620.94
8.3.100.0040.01224.06
8.3.90.0050.00326.77
8.3.80.0060.00318.31
8.3.70.0130.00716.63
8.3.60.0070.00718.39
8.3.50.0140.00716.80
8.3.40.0090.01220.25
8.3.30.0070.00718.92
8.3.20.0050.00324.18
8.3.10.0080.00024.66
8.3.00.0080.00026.16
8.2.290.0100.00920.29
8.2.280.0080.01018.30
8.2.270.0060.01217.34
8.2.260.0030.00616.47
8.2.250.0040.00416.44
8.2.240.0000.01020.50
8.2.230.0040.00422.58
8.2.220.0030.00737.54
8.2.210.0100.01026.77
8.2.200.0060.00316.75
8.2.190.0070.01016.63
8.2.180.0070.00716.63
8.2.170.0090.00919.13
8.2.160.0120.00322.96
8.2.150.0000.00825.66
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0000.00822.23
8.2.110.0040.00419.18
8.2.100.0100.00317.72
8.2.90.0040.00717.84
8.2.80.0030.00519.02
8.2.70.0100.00879.33
8.2.60.0130.00779.33
8.2.50.0160.00379.33
8.2.40.0130.00479.33
8.2.30.0090.00679.33
8.2.20.0080.00879.33
8.2.10.0140.00279.33
8.2.00.0140.00579.33
8.1.330.0130.00616.70
8.1.320.0130.00916.24
8.1.310.0000.00818.18
8.1.300.0030.00617.66
8.1.290.0060.00330.84
8.1.280.0060.01325.92
8.1.270.0080.00024.66
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00322.19
8.1.230.0090.00320.89
8.1.220.0040.00417.76
8.1.210.0040.00418.85
8.1.200.0120.00479.33
8.1.190.0120.00579.33
8.1.180.0180.00079.33
8.1.170.0150.00279.33
8.1.160.0060.01179.33
8.1.150.0110.00579.33
8.1.140.0150.00079.33
8.1.130.0140.00379.33
8.1.120.0190.00079.33
8.1.110.0160.00079.33
8.1.100.0110.00579.33
8.1.90.0120.00479.33
8.1.80.0080.00879.33
8.1.70.0130.00479.33
8.1.60.0150.00479.33
8.1.50.0130.00479.33
8.1.40.0100.00879.33
8.1.30.0150.00379.33
8.1.20.0140.00479.33
8.1.10.0160.00379.33
8.1.00.0140.00479.33
8.0.300.0020.00520.16
8.0.290.0130.00379.33
8.0.280.0120.00479.33
8.0.270.0100.00679.33
8.0.260.0100.00779.33
8.0.250.0110.00579.33
8.0.240.0130.00479.33
8.0.230.0120.00479.33
8.0.220.0080.00879.33
8.0.210.0170.00079.33
8.0.200.0160.00079.33
8.0.190.0150.00379.33
8.0.180.0080.00879.33
8.0.170.0160.00079.33
8.0.160.0140.00579.33
8.0.150.0120.00679.33
8.0.140.0140.00379.33
8.0.130.0140.00579.33
8.0.120.0140.00379.33
8.0.110.0170.00079.33
8.0.100.0160.00079.33
8.0.90.0130.00379.33
8.0.80.0120.00579.33
8.0.70.0130.00379.33
8.0.60.0110.00679.33
8.0.50.0120.00679.33
8.0.30.0130.00379.33
8.0.20.0080.00879.33
8.0.10.0130.00479.33

preferences:
27.05 ms | 403 KiB | 5 Q