3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Globock { trait Test { function toTest() { return 'toTest mock'; } } } namespace Acme { use Globock\Test class Foo { public function hello() { return toTest(); } } } namespace Acme\Test { use Acme\Foo; class FooTest { public function helloTest() { $a = new Foo(); echo $a->hello(); } } } namespace { function toTest() { return 'toTest'; } //$a = new Acme\Foo(); //echo $a->hello(); $b = new Acme\Test\FooTest(); $b->helloTest(); }

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.310.0080.03712.51
5.4.300.0050.03712.52
5.4.290.0070.03612.51
5.4.280.0090.03212.41
5.4.270.0070.03512.41
5.4.260.0060.04612.41
5.4.250.0100.03412.41
5.4.240.0060.03612.41
5.4.230.0060.03712.40
5.4.220.0090.03412.40
5.4.210.0040.03712.40
5.4.200.0050.04012.40
5.4.190.0070.03712.39
5.4.180.0060.03712.39
5.4.170.0070.03712.41
5.4.160.0040.03812.40
5.4.150.0060.03612.40
5.4.140.0070.05212.09
5.4.130.0030.04312.07
5.4.120.0070.03412.04
5.4.110.0090.03912.03
5.4.100.0090.03312.04
5.4.90.0100.04912.03
5.4.80.0100.04812.03
5.4.70.0090.04412.02
5.4.60.0030.04212.02
5.4.50.0080.03312.03
5.4.40.0090.03112.01
5.4.30.0080.03512.01
5.4.20.0080.03812.01
5.4.10.0050.03512.01
5.4.00.0080.04211.50
5.3.280.0040.04112.71
5.3.270.0040.04012.72
5.3.260.0050.03912.72
5.3.250.0070.03712.72
5.3.240.0100.03412.72
5.3.230.0090.04012.71
5.3.220.0080.03712.68
5.3.210.0050.04812.68
5.3.200.0030.03912.68
5.3.190.0070.03712.68
5.3.180.0050.03712.67
5.3.170.0090.03312.67
5.3.160.0090.04212.68
5.3.150.0060.03812.67
5.3.140.0070.04512.66
5.3.130.0040.04012.66
5.3.120.0070.04512.66
5.3.110.0070.04012.66
5.3.100.0040.03812.12
5.3.90.0090.03712.09
5.3.80.0070.03812.07
5.3.70.0060.04012.07
5.3.60.0040.03712.06
5.3.50.0070.03512.00
5.3.40.0090.03212.00
5.3.30.0070.03511.95
5.3.20.0060.03411.73
5.3.10.0080.03911.70
5.3.00.0030.03811.68
5.2.170.0050.0319.18
5.2.160.0060.0339.18
5.2.150.0040.0349.18
5.2.140.0030.0399.18
5.2.130.0070.0269.14
5.2.120.0020.0319.15
5.2.110.0020.0329.14
5.2.100.0040.0289.14
5.2.90.0060.0279.14
5.2.80.0030.0329.14
5.2.70.0030.0329.14
5.2.60.0070.0279.09
5.2.50.0060.0289.06
5.2.40.0030.0309.03
5.2.30.0030.0319.01
5.2.20.0060.0279.00
5.2.10.0040.0298.93
5.2.00.0040.0308.79
5.1.60.0030.0248.07
5.1.50.0050.0248.06
5.1.40.0030.0258.04
5.1.30.0060.0248.40
5.1.20.0030.0298.42
5.1.10.0030.0278.14
5.1.00.0030.0278.14
5.0.50.0050.0206.62
5.0.40.0040.0196.48
5.0.30.0040.0316.29
5.0.20.0040.0196.27
5.0.10.0040.0196.25
5.0.00.0050.0306.23
4.4.90.0020.0184.78
4.4.80.0070.0184.75
4.4.70.0040.0214.75
4.4.60.0060.0194.75
4.4.50.0030.0224.77
4.4.40.0020.0284.71
4.4.30.0040.0204.76
4.4.20.0040.0154.84
4.4.10.0020.0184.85
4.4.00.0020.0264.76
4.3.110.0060.0134.67
4.3.100.0040.0144.67
4.3.90.0040.0144.64
4.3.80.0050.0314.59
4.3.70.0040.0204.63
4.3.60.0090.0164.63
4.3.50.0050.0214.63
4.3.40.0070.0294.54
4.3.30.0030.0213.28
4.3.20.0030.0213.26
4.3.10.0020.0213.22
4.3.00.0000.0237.20

preferences:
139.56 ms | 1394 KiB | 7 Q