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.0070.01418.15
8.3.50.0140.00522.00
8.3.40.0140.00018.89
8.3.30.0100.00318.96
8.3.20.0040.00420.38
8.3.10.0080.00023.65
8.3.00.0040.00420.89
8.2.180.0100.01016.38
8.2.170.0120.00322.96
8.2.160.0070.01120.53
8.2.150.0040.00424.18
8.2.140.0090.00024.66
8.2.130.0180.00026.16
8.2.120.0060.00319.36
8.2.110.0000.00920.84
8.2.100.0110.00017.72
8.2.90.0050.00319.21
8.2.80.0040.00417.97
8.2.70.0050.00317.50
8.2.60.0060.00318.04
8.2.50.0030.00618.07
8.2.40.0000.00919.71
8.2.30.0000.00718.30
8.2.20.0080.00017.66
8.2.10.0050.00318.16
8.2.00.0050.00317.59
8.1.280.0080.00625.92
8.1.270.0080.00022.04
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0050.00522.66
8.1.230.0040.00817.42
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0030.00617.25
8.1.190.0040.00417.36
8.1.180.0000.01018.10
8.1.170.0040.00418.65
8.1.160.0040.00422.05
8.1.150.0000.00718.73
8.1.140.0040.00417.43
8.1.130.0000.00717.86
8.1.120.0050.00217.39
8.1.110.0080.00017.45
8.1.100.0040.00417.32
8.1.90.0000.00717.47
8.1.80.0070.00017.40
8.1.70.0070.00017.43
8.1.60.0030.00617.59
8.1.50.0020.00517.46
8.1.40.0080.00017.53
8.1.30.0000.00917.57
8.1.20.0050.00317.61
8.1.10.0000.00817.58
8.1.00.0050.00317.54
8.0.300.0000.00718.77
8.0.290.0030.00516.75
8.0.280.0070.00018.32
8.0.270.0030.00317.21
8.0.260.0030.00317.19
8.0.250.0070.00016.91
8.0.240.0000.00816.86
8.0.230.0000.00716.91
8.0.220.0000.00716.92
8.0.210.0040.00416.80
8.0.200.0030.00316.88
8.0.190.0040.00416.84
8.0.180.0000.00916.88
8.0.170.0030.00516.99
8.0.160.0070.00017.00
8.0.150.0030.00316.93
8.0.140.0030.00616.86
8.0.130.0030.00313.30
8.0.120.0030.00616.89
8.0.110.0030.00516.83
8.0.100.0040.00416.68
8.0.90.0030.00616.88
8.0.80.0090.00616.80
8.0.70.0040.00416.94
8.0.60.0000.00716.79
8.0.50.0040.00417.00
8.0.30.0110.00817.18
8.0.20.0120.00717.40
8.0.10.0070.00017.00
8.0.00.0090.00916.90
7.4.330.0000.00515.20
7.4.320.0000.00616.52
7.4.300.0030.00316.62
7.4.290.0000.00716.43
7.4.280.0050.00216.49
7.4.270.0000.00816.61
7.4.260.0000.01016.48
7.4.250.0060.00316.56
7.4.240.0030.00416.56
7.4.230.0030.00516.50
7.4.220.0060.01216.48
7.4.210.0000.01316.51
7.4.200.0070.00016.52
7.4.160.0090.00616.62
7.4.150.0110.00717.40
7.4.140.0090.00817.86
7.4.130.0080.00816.46
7.4.120.0090.00716.44
7.4.110.0030.01816.43
7.4.100.0140.00416.58
7.4.90.0100.00616.48
7.4.80.0140.01419.39
7.4.70.0030.01216.45
7.4.60.0120.01216.44
7.4.50.0080.00016.54
7.4.40.0060.01216.69
7.4.30.0130.00316.52
7.4.00.0120.00314.76
7.3.330.0000.00613.19
7.3.320.0020.00213.21
7.3.310.0020.00516.14
7.3.300.0070.00016.16
7.3.290.0030.01016.29
7.3.280.0080.00916.21
7.3.270.0130.01017.40
7.3.260.0130.00916.36
7.3.250.0080.00816.29
7.3.240.0060.01516.31
7.3.230.0100.00616.39
7.3.210.0090.01216.41
7.3.200.0080.00819.39
7.3.190.0140.00316.30
7.3.180.0040.01516.25
7.3.170.0090.00616.37
7.3.160.0090.00816.31
7.3.120.0040.01214.86
7.3.10.0090.00616.64
7.3.00.0040.00416.27
7.2.330.0160.00316.68
7.2.320.0110.01116.38
7.2.310.0100.00716.70
7.2.300.0070.01016.77
7.2.290.0000.02116.52
7.2.130.0060.00916.73
7.2.120.0030.00616.49
7.2.110.0070.00716.68
7.2.100.0110.00416.88
7.2.90.0070.00416.57
7.2.80.0040.01216.67
7.2.70.0040.01217.04
7.2.60.0040.01116.76
7.2.50.0070.00716.48
7.2.40.0090.00616.95
7.2.30.0060.00316.95
7.2.20.0110.00316.86
7.2.10.0040.01116.90
7.2.00.0060.00818.10
7.1.250.0050.00515.74
7.1.100.0090.00918.10
7.1.70.0000.00817.18
7.1.60.0060.01819.70
7.1.50.0140.01116.82
7.1.00.0070.07322.32
7.0.200.0050.00216.79
7.0.140.0000.07722.16
7.0.60.0130.06719.97
7.0.50.0100.05017.72
7.0.40.0030.08019.96
7.0.30.0470.04320.34
7.0.20.0070.06020.23
7.0.10.0130.08020.24
7.0.00.0070.08320.09
5.6.280.0070.06721.11
5.6.210.0030.04020.55
5.6.200.0000.07018.27
5.6.190.0130.03720.47
5.6.180.3200.04320.42
5.6.170.0270.04020.50
5.6.160.0100.06720.54
5.6.150.0100.07718.23
5.6.140.0100.05318.28
5.6.130.0070.08718.28
5.6.120.0200.07020.97
5.6.110.0100.07321.00
5.6.100.0070.07720.96
5.6.90.0030.07720.89
5.6.80.0000.04320.39
5.6.70.4430.03720.47
5.5.350.0100.07720.37
5.5.340.0070.04718.03
5.5.330.0100.04720.37
5.5.320.0270.06020.29
5.5.310.0270.05020.23
5.5.300.0100.07017.95
5.5.290.0070.07717.96
5.5.280.0100.07020.80
5.5.270.0070.04320.77
5.5.260.0100.05320.78
5.5.250.0070.07020.70
5.5.240.0330.07320.16
5.4.450.0600.03719.56
5.4.440.0300.04737.37
5.4.430.0270.04735.93
5.4.420.0530.04035.93
5.4.410.0170.04335.93
5.4.400.0030.04735.74
5.4.390.0230.03735.40
5.4.380.0670.05718.68
5.4.370.0900.04018.72
5.4.360.0170.04318.51
5.4.350.0100.06318.73
5.4.340.0230.05018.51
5.4.320.0070.04112.51
5.4.310.0050.03812.50
5.4.300.0050.03812.51
5.4.290.0040.04012.50
5.4.280.0050.03612.40
5.4.270.0070.03612.41
5.4.260.0020.04312.40
5.4.250.0050.03912.40
5.4.240.0040.03812.41
5.4.230.0050.03912.39
5.4.220.0100.03212.39
5.4.210.0100.03212.40
5.4.200.0060.04812.39
5.4.190.0090.05112.39
5.4.180.0120.05012.39
5.4.170.0110.05012.40
5.4.160.0070.03412.39
5.4.150.0030.03912.39
5.4.140.0050.03812.07
5.4.130.0060.03812.06
5.4.120.0090.04212.02
5.4.110.0110.04612.01
5.4.100.0070.03712.02
5.4.90.0060.04312.02
5.4.80.0030.03912.02
5.4.70.0040.03812.01
5.4.60.0060.03612.01
5.4.50.0050.03712.01
5.4.40.0070.03512.00
5.4.30.0040.03812.00
5.4.20.0050.03712.00
5.4.10.0070.03411.99
5.4.00.0080.03511.48
5.3.290.0060.04612.80
5.3.280.0080.03612.71
5.3.270.0100.03612.72
5.3.260.0120.03512.72
5.3.250.0110.03412.72
5.3.240.0040.04012.72
5.3.230.0060.03912.71
5.3.220.0120.03412.68
5.3.210.0130.03312.68
5.3.200.0060.03812.68
5.3.190.0050.04012.68
5.3.180.0030.04212.68
5.3.170.0050.03912.67
5.3.160.0060.03612.67
5.3.150.0060.03912.68
5.3.140.0050.03812.66
5.3.130.0040.04412.66
5.3.120.0110.04912.66
5.3.110.0060.04012.66
5.3.100.0020.04112.12
5.3.90.0050.03712.10
5.3.80.0100.03312.09
5.3.70.0050.03812.09
5.3.60.0020.04012.07
5.3.50.0080.03512.02
5.3.40.0070.03612.02
5.3.30.0060.03511.98
5.3.20.0040.03711.77
5.3.10.0050.03611.73
5.3.00.0070.03611.71
5.2.170.0050.0319.18
5.2.160.0070.0279.18
5.2.150.0050.0309.18
5.2.140.0040.0319.18
5.2.130.0060.0289.14
5.2.120.0050.0289.14
5.2.110.0060.0289.14
5.2.100.0060.0289.14
5.2.90.0090.0259.14
5.2.80.0040.0329.14
5.2.70.0050.0309.14
5.2.60.0070.0289.09
5.2.50.0050.0309.06
5.2.40.0040.0319.04
5.2.30.0040.0309.01
5.2.20.0050.0299.00
5.2.10.0020.0318.93
5.2.00.0060.0288.79
5.1.60.0050.0248.07
5.1.50.0030.0268.06
5.1.40.0030.0268.04
5.1.30.0080.0228.39
5.1.20.0040.0278.42
5.1.10.0050.0258.14
5.1.00.0030.0278.14
5.0.50.0050.0196.62
5.0.40.0040.0196.47
5.0.30.0030.0326.29
5.0.20.0020.0216.27
5.0.10.0040.0196.25
5.0.00.0010.0336.23
4.4.90.0030.0184.77
4.4.80.0030.0214.76
4.4.70.0030.0214.76
4.4.60.0040.0174.75
4.4.50.0030.0214.77
4.4.40.0050.0294.71
4.4.30.0060.0154.76
4.4.20.0040.0214.84
4.4.10.0040.0194.85
4.4.00.0050.0264.76
4.3.110.0050.0154.67
4.3.100.0060.0154.67
4.3.90.0060.0134.64
4.3.80.0040.0234.59
4.3.70.0040.0134.63
4.3.60.0000.0174.63
4.3.50.0020.0184.63
4.3.40.0030.0244.54
4.3.30.0040.0143.29
4.3.20.0030.0153.26
4.3.10.0000.0183.22
4.3.00.0000.01335.00

preferences:
45.24 ms | 401 KiB | 5 Q