3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Generic\Space { function bar() { echo "bar over here!"; } } namespace Some\Other { class Foo { use \My\TraitSpace\NiceTrait; function baz() { $method = new ReflectionMethod('Some\Other\Foo', 'bar'); $method->setAccessible(false); } function bar() { echo 'declared bar'; } } } namespace My\TraitSpace { use \Generic\Space; trait NiceTrait { function bar() { echo "within the trait!"; } } } namespace { $foo = new Some\Other\Foo(); $foo->baz(); $foo->bar(); }

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.3.60.0090.00618.56
8.3.50.0100.01022.02
8.3.40.0150.00018.86
8.3.30.0030.01319.04
8.3.20.0080.00020.34
8.3.10.0040.00423.48
8.3.00.0000.00920.89
8.2.180.0130.00916.63
8.2.170.0140.00322.96
8.2.160.0030.01020.52
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0040.01126.16
8.2.120.0040.00419.36
8.2.110.0090.00022.04
8.2.100.0110.00420.59
8.2.90.0030.00619.14
8.2.80.0030.00517.97
8.2.70.0050.00517.38
8.2.60.0050.00317.93
8.2.50.0030.00618.07
8.2.40.0000.00919.88
8.2.30.0040.00418.12
8.2.20.0060.00317.73
8.2.10.0000.00918.12
8.2.00.0030.00617.73
8.1.280.0070.00725.92
8.1.270.0080.00022.19
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00321.76
8.1.230.0070.00319.16
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0090.00017.35
8.1.190.0050.00317.35
8.1.180.0000.01018.10
8.1.170.0080.00018.66
8.1.160.0000.00722.01
8.1.150.0080.00018.74
8.1.140.0000.00817.44
8.1.130.0030.00317.82
8.1.120.0040.00417.36
8.1.110.0000.00817.36
8.1.100.0070.00017.41
8.1.90.0000.00717.42
8.1.80.0000.00717.44
8.1.70.0000.00717.41
8.1.60.0060.00317.54
8.1.50.0030.00617.40
8.1.40.0000.00917.53
8.1.30.0050.00317.60
8.1.20.0020.00517.53
8.1.10.0050.00217.52
8.1.00.0000.00717.36
8.0.300.0050.00218.77
8.0.290.0070.00016.75
8.0.280.0030.00518.49
8.0.270.0030.00317.32
8.0.260.0060.00017.17
8.0.250.0070.00017.00
8.0.240.0000.00916.98
8.0.230.0000.00716.88
8.0.220.0000.00716.89
8.0.210.0030.00316.79
8.0.200.0060.00017.08
8.0.190.0040.00416.94
8.0.180.0020.00516.89
8.0.170.0000.00716.97
8.0.160.0040.00416.95
8.0.150.0030.00316.82
8.0.140.0070.00316.84
8.0.130.0000.00513.38
8.0.120.0030.00616.95
8.0.110.0000.00716.91
8.0.100.0080.00016.78
8.0.90.0040.00416.93
8.0.80.0140.00716.90
8.0.70.0070.00016.93
8.0.60.0080.00016.84
8.0.50.0040.00416.96
8.0.30.0100.01017.23
8.0.20.0100.01017.41
8.0.10.0040.00417.09
8.0.00.0080.01016.73
7.4.330.0000.00515.20
7.4.320.0060.00016.65
7.4.300.0030.00316.52
7.4.290.0030.00316.61
7.4.280.0040.00416.44
7.4.270.0080.00016.63
7.4.260.0000.00716.44
7.4.250.0050.00316.61
7.4.240.0000.00716.46
7.4.230.0030.00616.43
7.4.220.0060.01216.54
7.4.210.0110.00316.45
7.4.200.0040.00416.62
7.4.160.0110.00516.51
7.4.150.0140.00517.40
7.4.140.0150.00317.86
7.4.130.0150.00216.56
7.4.120.0130.00716.47
7.4.110.0060.01016.47
7.4.100.0120.00616.51
7.4.90.0070.01116.36
7.4.80.0090.00919.39
7.4.70.0100.00616.30
7.4.60.0100.01016.53
7.4.50.0030.00616.65
7.4.40.0070.01016.64
7.4.30.0030.01416.59
7.4.00.0000.01414.81
7.3.330.0030.00313.32
7.3.320.0000.00513.31
7.3.310.0070.00016.21
7.3.300.0000.00716.37
7.3.290.0060.00916.36
7.3.280.0110.00716.36
7.3.270.0100.00717.40
7.3.260.0120.00916.44
7.3.250.0120.00816.43
7.3.240.0090.00916.61
7.3.230.0140.00716.56
7.3.210.0150.00316.39
7.3.200.0030.01419.39
7.3.190.0170.00616.57
7.3.180.0090.00616.27
7.3.170.0060.01016.46
7.3.160.0100.00716.43
7.3.120.0040.01114.92
7.3.10.0060.00616.80
7.3.00.0070.00716.52
7.2.330.0090.00916.58
7.2.320.0030.01316.62
7.2.310.0140.00316.47
7.2.300.0060.01016.45
7.2.290.0090.01416.41
7.2.130.0030.01016.72
7.2.120.0090.00616.82
7.2.110.0030.00916.89
7.2.100.0060.00616.67
7.2.90.0080.00816.93
7.2.80.0070.01116.87
7.2.70.0100.00616.80
7.2.60.0050.00916.83
7.2.50.0040.01116.91
7.2.40.0060.00916.95
7.2.30.0090.00616.81
7.2.20.0080.00816.71
7.2.10.0120.00016.87
7.2.00.0040.01416.88
7.1.250.0000.01315.82
7.1.200.0090.00015.52
7.1.70.0000.00717.07
7.1.60.0130.01319.70
7.1.50.0070.01516.79
7.1.00.0030.07722.45
7.0.200.0000.00716.48
7.0.140.0070.07022.09
7.0.60.0170.06320.02
7.0.50.0030.04317.73
7.0.40.0030.05020.14
7.0.30.0230.05720.16
7.0.20.0370.04320.09
7.0.10.0230.07320.19
7.0.00.0170.04020.07
5.6.280.0070.07020.93
5.6.210.0030.08320.67
5.6.200.0000.08318.13
5.6.190.0070.04720.39
5.6.180.0100.07720.61
5.6.170.0270.03020.62
5.6.160.0100.06720.61
5.6.150.0100.07718.12
5.6.140.0100.03718.28
5.6.130.0030.04718.16
5.6.120.0030.04321.01
5.6.110.0070.03721.01
5.6.100.0030.08721.04
5.6.90.0200.06020.98
5.6.80.0030.07320.54
5.6.70.4270.03720.51
5.5.350.0100.06720.42
5.5.340.0070.08018.05
5.5.330.0000.07320.21
5.5.320.0000.08720.25
5.5.310.0300.05020.36
5.5.300.0030.05017.98
5.5.290.0130.08018.09
5.5.280.0070.05020.91
5.5.270.0130.08020.77
5.5.260.0130.08020.84
5.5.250.0000.05320.59
5.5.240.0100.07720.37
5.4.450.1500.03019.51
5.4.440.0370.04739.55
5.4.430.0200.04335.93
5.4.420.0230.04035.93
5.4.410.0170.05035.93
5.4.400.0430.04035.89
5.4.390.0370.04735.74
5.4.380.0130.05318.78
5.4.370.0200.05018.70
5.4.360.0200.05318.59
5.4.350.0170.05018.78
5.4.340.0200.04718.48
5.4.320.0090.03312.50
5.4.310.0080.03912.51
5.4.300.0060.03812.51
5.4.290.0080.03512.50
5.4.280.0070.03412.40
5.4.270.0050.03712.40
5.4.260.0100.03312.40
5.4.250.0080.03712.40
5.4.240.0120.03012.41
5.4.230.0130.03112.39
5.4.220.0060.03912.39
5.4.210.0040.03912.40
5.4.200.0070.03812.39
5.4.190.0060.05012.39
5.4.180.0090.05012.39
5.4.170.0140.04512.40
5.4.160.0090.04612.39
5.4.150.0070.03712.39
5.4.140.0050.03912.07
5.4.130.0050.03712.06
5.4.120.0050.03612.02
5.4.110.0050.03612.02
5.4.100.0060.03412.01
5.4.90.0040.03912.02
5.4.80.0040.04012.02
5.4.70.0070.03512.01
5.4.60.0090.03312.01
5.4.50.0060.03712.01
5.4.40.0040.04012.00
5.4.30.0060.03612.00
5.4.20.0020.04011.99
5.4.10.0060.03512.00
5.4.00.0060.03511.49
5.3.290.0050.03912.80
5.3.280.0070.03712.71
5.3.270.0080.03912.72
5.3.260.0080.04012.72
5.3.250.0080.04112.72
5.3.240.0090.04312.72
5.3.230.0090.04712.71
5.3.220.0040.04712.68
5.3.210.0070.04812.68
5.3.200.0060.03712.68
5.3.190.0050.03812.68
5.3.180.0070.03512.67
5.3.170.0040.03812.67
5.3.160.0040.03812.67
5.3.150.0050.03812.67
5.3.140.0080.03412.66
5.3.130.0030.04112.66
5.3.120.0050.03912.66
5.3.110.0030.04112.66
5.3.100.0080.03712.13
5.3.90.0070.03612.11
5.3.80.0120.03112.09
5.3.70.0070.03812.09
5.3.60.0050.03712.08
5.3.50.0060.03612.02
5.3.40.0060.03612.02
5.3.30.0060.03411.98
5.3.20.0080.03411.77
5.3.10.0110.04511.73
5.3.00.0050.04411.71
5.2.170.0070.0289.18
5.2.160.0050.0289.18
5.2.150.0040.0409.18
5.2.140.0020.0329.18
5.2.130.0040.0329.14
5.2.120.0040.0299.14
5.2.110.0040.0309.14
5.2.100.0070.0289.14
5.2.90.0050.0309.14
5.2.80.0080.0299.14
5.2.70.0050.0319.14
5.2.60.0070.0309.09
5.2.50.0040.0339.06
5.2.40.0060.0289.04
5.2.30.0020.0339.01
5.2.20.0050.0309.00
5.2.10.0080.0278.93
5.2.00.0080.0258.79
5.1.60.0040.0248.07
5.1.50.0040.0258.06
5.1.40.0040.0248.05
5.1.30.0050.0268.40
5.1.20.0020.0298.42
5.1.10.0040.0268.14
5.1.00.0010.0318.14
5.0.50.0030.0216.62
5.0.40.0040.0196.47
5.0.30.0030.0326.29
5.0.20.0070.0156.27
5.0.10.0050.0186.25
5.0.00.0030.0396.24
4.4.90.0050.0184.78
4.4.80.0040.0164.75
4.4.70.0040.0144.75
4.4.60.0030.0154.75
4.4.50.0020.0164.77
4.4.40.0030.0264.71
4.4.30.0050.0124.76
4.4.20.0020.0164.84
4.4.10.0070.0184.85
4.4.00.0040.0244.76
4.3.110.0040.0154.67
4.3.100.0070.0124.66
4.3.90.0010.0164.63
4.3.80.0050.0224.58
4.3.70.0040.0144.63
4.3.60.0020.0154.63
4.3.50.0020.0164.63
4.3.40.0020.0254.54
4.3.30.0010.0173.29
4.3.20.0010.0173.26
4.3.10.0060.0123.22
4.3.00.0030.01735.39

preferences:
44.2 ms | 401 KiB | 5 Q