3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo{ function start(){ names = load friend's names parsenames(names) if true then call friend john } function parsenames(){} function callFriend(name){ f = new Friend //~ 100 methods f->callFriend(name) } foo = new foo() foo->start() Or Foo = new foo() But new foo->start() What is faster?

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)
5.4.320.0070.03612.52
5.4.310.0120.03512.51
5.4.300.0040.03912.52
5.4.290.0050.04312.52
5.4.280.0060.03612.41
5.4.270.0080.04312.41
5.4.260.0080.03612.41
5.4.250.0100.03712.41
5.4.240.0070.03712.41
5.4.230.0070.04912.40
5.4.220.0120.03412.40
5.4.210.0070.04612.40
5.4.200.0090.03812.40
5.4.190.0070.03712.39
5.4.180.0040.04112.39
5.4.170.0070.03812.41
5.4.160.0130.04112.40
5.4.150.0060.03912.39
5.4.140.0070.03712.09
5.4.130.0080.03312.07
5.4.120.0070.04112.04
5.4.110.0130.04112.03
5.4.100.0130.03112.03
5.4.90.0080.03912.03
5.4.80.0090.03712.03
5.4.70.0090.03712.02
5.4.60.0050.03612.02
5.4.50.0090.03712.02
5.4.40.0060.03812.02
5.4.30.0120.04212.01
5.4.20.0060.03812.01
5.4.10.0110.04012.02
5.4.00.0060.04011.50
5.3.290.0070.04112.80
5.3.280.0090.04012.71
5.3.270.0050.04312.73
5.3.260.0070.04012.72
5.3.250.0090.03412.72
5.3.240.0110.03712.72
5.3.230.0120.03412.71
5.3.220.0100.04812.68
5.3.210.0090.04212.68
5.3.200.0070.04212.68
5.3.190.0090.03912.68
5.3.180.0090.03412.68
5.3.170.0060.03812.67
5.3.160.0050.04012.67
5.3.150.0070.03612.68
5.3.140.0090.03412.66
5.3.130.0090.03512.66
5.3.120.0080.03812.66
5.3.110.0070.04112.66
5.3.100.0060.04012.13
5.3.90.0070.04712.10
5.3.80.0040.03912.09
5.3.70.0060.04112.09
5.3.60.0060.04412.08
5.3.50.0090.03912.03
5.3.40.0090.04412.03
5.3.30.0060.03911.98
5.3.20.0070.03711.76
5.3.10.0120.04611.73
5.3.00.0070.04011.72
5.2.170.0090.0299.22
5.2.160.0090.0339.22
5.2.150.0070.0349.22
5.2.140.0060.0299.22
5.2.130.0070.0369.17
5.2.120.0070.0279.18
5.2.110.0070.0339.18
5.2.100.0060.0309.18
5.2.90.0080.0289.18
5.2.80.0070.0329.18
5.2.70.0060.0429.17
5.2.60.0030.0329.13
5.2.50.0060.0299.10
5.2.40.0060.0329.08
5.2.30.0030.0319.05
5.2.20.0080.0259.04
5.2.10.0060.0268.96
5.2.00.0060.0368.81
5.1.60.0080.0258.09
5.1.50.0080.0248.09
5.1.40.0080.0308.07
5.1.30.0060.0258.42
5.1.20.0070.0438.44
5.1.10.0050.0308.17
5.1.00.0070.0268.17
5.0.50.0040.0216.64
5.0.40.0040.0196.50
5.0.30.0040.0336.31
5.0.20.0050.0206.28
5.0.10.0040.0226.26
5.0.00.0010.0346.25
4.4.90.0030.0224.78
4.4.80.0030.0154.76
4.4.70.0030.0214.75
4.4.60.0040.0184.76
4.4.50.0050.0164.77
4.4.40.0040.0294.71
4.4.30.0050.0174.76
4.4.20.0030.0194.84
4.4.10.0030.0184.85
4.4.00.0070.0334.76
4.3.110.0020.0204.67
4.3.100.0040.0244.66
4.3.90.0020.0184.63
4.3.80.0060.0224.58
4.3.70.0060.0264.63
4.3.60.0050.0194.63
4.3.50.0060.0144.62
4.3.40.0060.0304.54
4.3.30.0020.0213.30
4.3.20.0010.0173.28
4.3.10.0030.0173.24
4.3.00.0000.01714.87

preferences:
142.7 ms | 1394 KiB | 7 Q