3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface I { function test($key); } trait Impl { function test($key) { return 'trait!'; } } class Test implements I { use Impl; function test($key = false) { return 'class'; } } $t = new Test, var_dump($t->test(), $t-test('test'));

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.350.0080.04412.04
5.4.340.0080.04512.03
5.4.320.0090.04912.52
5.4.310.0110.06512.52
5.4.300.0060.04812.52
5.4.290.0110.05012.51
5.4.280.0050.04512.41
5.4.270.0070.04412.41
5.4.260.0110.04612.41
5.4.250.0070.04612.41
5.4.240.0100.05012.41
5.4.230.0100.05112.40
5.4.220.0080.05112.40
5.4.210.0080.04412.40
5.4.200.0060.04312.40
5.4.190.0050.04812.39
5.4.180.0070.03912.40
5.4.170.0100.04912.41
5.4.160.0070.05612.40
5.4.150.0090.04312.40
5.4.140.0110.04912.09
5.4.130.0140.04512.07
5.4.120.0110.04512.04
5.4.110.0070.04712.03
5.4.100.0070.05112.03
5.4.90.0120.04812.03
5.4.80.0090.04912.04
5.4.70.0100.05212.03
5.4.60.0130.06112.02
5.4.50.0130.11512.03
5.4.40.0080.05112.02
5.4.30.0110.05412.01
5.4.20.0080.05612.00
5.4.10.0080.05412.01
5.4.00.0050.05311.50
5.3.290.0100.05212.80
5.3.280.0090.07012.71
5.3.270.0070.05612.72
5.3.260.0140.04712.72
5.3.250.0180.05212.72
5.3.240.0120.05412.72
5.3.230.0040.05512.71
5.3.220.0150.04912.68
5.3.210.0070.05912.68
5.3.200.0080.04812.68
5.3.190.0070.05712.68
5.3.180.0130.04812.68
5.3.170.0080.05212.67
5.3.160.0090.05212.67
5.3.150.0120.05412.67
5.3.140.0090.05112.66
5.3.130.0120.06112.66
5.3.120.0140.04612.65
5.3.110.0090.06012.66
5.3.100.0130.05712.13
5.3.90.0060.05212.11
5.3.80.0070.06112.09
5.3.70.0030.04812.09
5.3.60.0120.04112.08
5.3.50.0070.04112.03
5.3.40.0040.04412.03
5.3.30.0080.04811.98
5.3.20.0050.04911.76
5.3.10.0080.04811.73
5.3.00.0050.04511.71
5.2.170.0070.0399.22
5.2.160.0070.0359.22
5.2.150.0050.0389.22
5.2.140.0060.0419.22
5.2.130.0050.0309.18
5.2.120.0080.0319.18
5.2.110.0090.0349.18
5.2.100.0090.0319.18
5.2.90.0040.0349.18
5.2.80.0070.0419.18
5.2.70.0060.0359.17
5.2.60.0020.0449.13
5.2.50.0080.0419.10
5.2.40.0080.0379.08
5.2.30.0090.0399.05
5.2.20.0180.0629.04
5.2.10.0050.0398.95
5.2.00.0100.0378.80
5.1.60.0060.0338.09
5.1.50.0050.0338.08
5.1.40.0030.0348.07
5.1.30.0050.0398.42
5.1.20.0080.0378.44
5.1.10.0100.0328.16
5.1.00.0080.0328.16
5.0.50.0050.0276.64
5.0.40.0060.0246.50
5.0.30.0030.0406.31
5.0.20.0060.0246.28
5.0.10.0050.0276.26
5.0.00.0090.0356.25
4.4.90.0040.0224.78
4.4.80.0050.0204.75
4.4.70.0040.0204.76
4.4.60.0030.0214.75
4.4.50.0060.0194.77
4.4.40.0050.0324.71
4.4.30.0030.0214.76
4.4.20.0040.0214.84
4.4.10.0020.0234.84
4.4.00.0050.0294.76
4.3.110.0050.0184.67
4.3.100.0080.0454.67
4.3.90.0050.0194.64
4.3.80.0040.0464.59
4.3.70.0060.0214.63
4.3.60.0050.0174.63
4.3.50.0050.0204.63
4.3.40.0050.0304.54
4.3.30.0040.0193.29
4.3.20.0030.0223.26
4.3.10.0020.0223.22
4.3.00.0370.0177.38

preferences:
139.71 ms | 1394 KiB | 7 Q