3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Hash { public function generateId() { return uniqid(); } public function generateMD5($param) { return md5($param); } } trait HtmlDecorator { public function decorateHtml($param) { return '<html>'.$param.'</html>'; } public function decorateBold($param) { return '<b>'.$param.'</b>'; } public function decorateBody($param) { return '<body>'.$param.'</body>'; } } interface Hashable { function generateMD5($param); } class User implements Hashable { use HtmlDecorator,Hash; } print (new User())->generateMD5("Kevin");

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)
7.1.70.0000.00717.16
7.1.60.0040.02119.32
7.1.50.0160.00616.93
7.1.00.0070.07322.57
7.0.200.0030.00516.82
7.0.140.0070.07022.00
7.0.60.0170.05720.02
7.0.50.0170.07017.89
7.0.40.0030.04720.27
7.0.30.0200.04020.24
7.0.20.0270.04720.21
7.0.10.0100.04020.26
7.0.00.0100.03720.26
5.6.280.0070.07020.90
5.6.210.0130.07720.76
5.6.200.0130.08018.20
5.6.190.0030.04720.64
5.6.180.0400.04320.55
5.6.170.0300.04020.51
5.6.160.0000.04320.44
5.6.150.0100.06718.21
5.6.140.0070.07318.17
5.6.130.0130.08018.27
5.6.120.0000.05020.77
5.6.110.0170.07021.10
5.6.100.0100.08321.07
5.6.90.0100.04321.13
5.6.80.0100.07720.41
5.5.350.0070.03720.54
5.5.340.0070.05717.95
5.5.330.0170.04020.21
5.5.320.0270.06720.31
5.5.310.0200.08320.27
5.5.300.0200.06717.94
5.5.290.0070.07718.06
5.5.280.0070.08720.90
5.5.270.0070.06020.79
5.5.260.0070.04720.89
5.5.250.0200.07020.72
5.5.240.0230.07320.02
5.4.450.1400.03719.43
5.4.440.0930.06319.56
5.4.430.0800.05719.19
5.4.420.0700.00019.46
5.4.410.0670.00019.45
5.4.400.0630.00019.23
5.4.390.0630.00019.09
5.4.380.0400.08018.57
5.4.370.0530.06718.63
5.4.360.0470.07018.76
5.4.350.0370.06018.75
5.4.340.0300.07318.73
5.4.320.0090.03512.52
5.4.310.0060.03912.51
5.4.300.0100.04212.51
5.4.290.0050.04012.50
5.4.280.0070.03512.40
5.4.270.0090.03712.41
5.4.260.0080.04912.40
5.4.250.0100.04312.41
5.4.240.0050.04412.41
5.4.230.0070.04012.40
5.4.220.0040.03912.40
5.4.210.0110.03512.40
5.4.200.0050.03912.40
5.4.190.0070.03712.40
5.4.180.0050.03812.39
5.4.170.0030.04212.41
5.4.160.0090.03512.41
5.4.150.0090.03412.40
5.4.140.0090.03812.09
5.4.130.0060.03612.07
5.4.120.0070.03512.03
5.4.110.0060.03812.02
5.4.100.0070.03812.03
5.4.90.0060.03812.03
5.4.80.0050.04012.02
5.4.70.0060.03512.02
5.4.60.0080.03912.02
5.4.50.0110.03712.02
5.4.40.0090.03912.00
5.4.30.0050.04312.00
5.4.20.0040.03612.00
5.4.10.0070.03312.00
5.4.00.0070.03711.49
5.3.290.0070.03912.80
5.3.280.0090.03612.71
5.3.270.0070.03912.73
5.3.260.0060.04112.72
5.3.250.0080.03612.71
5.3.240.0080.04612.72
5.3.230.0070.03912.71
5.3.220.0040.04312.68
5.3.210.0050.04012.68
5.3.200.0060.03712.68
5.3.190.0030.04012.68
5.3.180.0090.03412.68
5.3.170.0090.03412.67
5.3.160.0080.03612.67
5.3.150.0060.04112.67
5.3.140.0090.03612.66
5.3.130.0050.04112.65
5.3.120.0070.03912.66
5.3.110.0090.03712.66
5.3.100.0060.03712.12
5.3.90.0060.03712.08
5.3.80.0050.03712.07
5.3.70.0060.03812.07
5.3.60.0100.04712.06
5.3.50.0110.03412.00
5.3.40.0080.04212.00
5.3.30.0110.05011.95
5.3.20.0100.03811.73
5.3.10.0070.03511.70
5.3.00.0070.03511.68
5.2.170.0090.0329.18
5.2.160.0080.0279.18
5.2.150.0110.0359.18
5.2.140.0170.0339.18
5.2.130.0180.0409.14
5.2.120.0120.0329.14
5.2.110.0060.0339.14
5.2.100.0050.0319.14
5.2.90.0090.0289.14
5.2.80.0070.0389.14
5.2.70.0050.0359.14
5.2.60.0070.0299.09
5.2.50.0060.0339.06
5.2.40.0040.0319.04
5.2.30.0100.0269.01
5.2.20.0070.0299.00
5.2.10.0040.0348.92
5.2.00.0060.0318.79
5.1.60.0040.0298.07
5.1.50.0030.0338.06
5.1.40.0030.0318.05
5.1.30.0050.0278.40
5.1.20.0100.0278.41
5.1.10.0030.0268.14
5.1.00.0030.0268.14
5.0.50.0040.0196.62
5.0.40.0070.0226.47
5.0.30.0020.0366.30
5.0.20.0040.0186.27
5.0.10.0030.0206.24
5.0.00.0040.0316.23
4.4.90.0020.0174.78
4.4.80.0030.0154.75
4.4.70.0040.0144.75
4.4.60.0040.0144.76
4.4.50.0040.0144.77
4.4.40.0010.0314.71
4.4.30.0020.0164.76
4.4.20.0030.0154.85
4.4.10.0020.0164.85
4.4.00.0030.0254.76
4.3.110.0020.0174.67
4.3.100.0030.0154.67
4.3.90.0020.0154.64
4.3.80.0010.0264.58
4.3.70.0030.0144.63
4.3.60.0040.0134.63
4.3.50.0020.0164.63
4.3.40.0020.0244.53
4.3.30.0020.0163.28
4.3.20.0020.0163.26
4.3.10.0000.0183.22
4.3.00.0000.01316.39

preferences:
29.57 ms | 400 KiB | 5 Q