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 \NiceTrait; function baz() { $this->bar = function() {echo 'im a callable bar';}; } function bar() { echo 'this is what I need to replace'; } } } namespace { use \Generic\Space; trait NiceTrait { } $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.01118.25
8.3.50.0110.00822.05
8.3.40.0090.00619.02
8.3.30.0070.00719.05
8.3.20.0070.00020.34
8.3.10.0000.00823.61
8.3.00.0060.00320.81
8.2.180.0090.01316.63
8.2.170.0150.00022.96
8.2.160.0130.00720.27
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0030.00619.36
8.2.110.0030.00722.02
8.2.100.0110.00018.09
8.2.90.0050.00519.05
8.2.80.0040.00417.97
8.2.70.0060.00317.60
8.2.60.0040.00418.04
8.2.50.0000.01018.07
8.2.40.0060.00319.65
8.2.30.0040.00418.20
8.2.20.0030.00617.74
8.2.10.0050.00318.12
8.2.00.0030.00517.56
8.1.280.0110.00725.92
8.1.270.0050.00222.05
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0060.00323.79
8.1.230.0110.00019.15
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0040.00417.25
8.1.180.0070.00418.10
8.1.170.0030.00518.55
8.1.160.0000.00722.02
8.1.150.0040.00418.69
8.1.140.0040.00417.47
8.1.130.0030.00317.75
8.1.120.0070.00017.40
8.1.110.0080.00017.35
8.1.100.0040.00417.36
8.1.90.0000.00717.29
8.1.80.0040.00417.46
8.1.70.0030.00317.38
8.1.60.0050.00317.66
8.1.50.0040.00417.38
8.1.40.0000.00917.56
8.1.30.0050.00317.62
8.1.20.0040.00417.70
8.1.10.0050.00317.54
8.1.00.0050.00317.49
8.0.300.0040.00418.77
8.0.290.0000.00716.63
8.0.280.0070.00018.38
8.0.270.0030.00317.30
8.0.260.0030.00317.21
8.0.250.0030.00317.00
8.0.240.0040.00416.97
8.0.230.0000.00716.89
8.0.220.0030.00316.92
8.0.210.0040.00416.77
8.0.200.0000.00816.93
8.0.190.0070.00016.90
8.0.180.0080.00316.94
8.0.170.0060.00316.79
8.0.160.0040.00416.94
8.0.150.0030.00316.84
8.0.140.0060.00316.83
8.0.130.0000.00613.32
8.0.120.0060.00316.75
8.0.110.0000.00716.88
8.0.100.0000.00716.94
8.0.90.0060.00316.91
8.0.80.0160.00016.88
8.0.70.0000.00816.85
8.0.60.0050.00216.75
8.0.50.0000.00816.80
8.0.30.0100.00917.16
8.0.20.0100.00917.40
8.0.10.0040.00417.01
8.0.00.0130.01017.04
7.4.330.0050.00015.06
7.4.320.0000.00716.65
7.4.300.0030.00316.55
7.4.290.0000.00716.48
7.4.280.0030.00616.55
7.4.270.0040.00416.59
7.4.260.0030.00716.49
7.4.250.0040.00416.55
7.4.240.0070.00016.51
7.4.230.0070.00016.44
7.4.220.0070.01016.40
7.4.210.0070.00716.50
7.4.200.0040.00416.48
7.4.160.0110.00416.57
7.4.150.0140.00917.40
7.4.140.0110.01117.86
7.4.130.0100.00716.46
7.4.120.0110.00816.53
7.4.110.0160.00616.39
7.4.100.0070.01116.52
7.4.90.0040.01216.62
7.4.80.0140.00719.39
7.4.70.0030.01316.36
7.4.60.0160.00616.48
7.4.50.0050.00316.58
7.4.40.0060.01016.45
7.4.30.0090.00616.66
7.4.00.0000.01314.75
7.3.330.0030.00313.17
7.3.320.0060.00013.16
7.3.310.0070.00016.20
7.3.300.0070.00016.29
7.3.290.0070.00716.32
7.3.280.0060.01216.28
7.3.270.0200.00317.40
7.3.260.0220.00316.36
7.3.250.0080.01016.28
7.3.240.0080.01216.50
7.3.230.0110.00816.39
7.3.210.0090.00916.27
7.3.200.0120.00919.39
7.3.190.0070.01416.38
7.3.180.0060.01016.59
7.3.170.0110.00416.46
7.3.160.0140.00316.54
7.3.120.0040.01215.04
7.2.330.0060.01316.66
7.2.320.0070.01116.88
7.2.310.0030.01716.66
7.2.300.0130.00416.44
7.2.290.0070.01016.83
7.2.00.0070.00319.30
7.1.100.0070.01517.90
7.1.70.0000.00917.25
7.1.60.0070.01819.70
7.1.50.0070.01716.48
7.1.00.0030.07722.33
7.0.200.0060.00316.77
7.0.140.0030.07022.04
7.0.60.0030.08020.03
7.0.50.0030.08717.82
7.0.40.0000.05020.11
7.0.30.0570.07320.26
7.0.20.0300.06720.23
7.0.10.0230.06020.06
7.0.00.0100.04720.23
5.6.280.0100.06721.11
5.6.210.0170.06020.52
5.6.200.0030.06318.14
5.6.190.0100.04020.57
5.6.180.0030.04020.62
5.6.170.0230.04720.55
5.6.160.0130.05020.56
5.6.150.0030.05318.18
5.6.140.0030.04718.24
5.6.130.0030.08018.15
5.6.120.0030.04020.91
5.6.110.0070.07321.20
5.6.100.0230.05021.15
5.6.90.0130.06321.09
5.6.80.0070.08020.41
5.6.70.0170.08320.39
5.5.350.0030.08720.41
5.5.340.0030.04018.08
5.5.330.0030.05720.41
5.5.320.0330.06020.33
5.5.310.0470.06020.34
5.5.300.0100.07018.04
5.5.290.0100.08017.98
5.5.280.0030.07720.78
5.5.270.0100.04320.80
5.5.260.0170.06020.76
5.5.250.0030.08020.51
5.5.240.0170.06720.37
5.4.450.0670.03319.42
5.4.440.0200.04337.34
5.4.430.0270.05335.93
5.4.420.0230.03735.93
5.4.410.0330.05035.93
5.4.400.0130.04335.74
5.4.390.0130.05335.39
5.4.380.0100.06718.73
5.4.370.0130.05318.54
5.4.360.0200.04718.73
5.4.350.0130.05718.78
5.4.340.0170.05018.56
5.4.320.0050.03712.51
5.4.310.0040.03812.51
5.4.300.0070.03712.51
5.4.290.0090.03612.51
5.4.280.0040.03812.41
5.4.270.0040.03812.41
5.4.260.0090.03612.41
5.4.250.0090.03512.41
5.4.240.0050.03812.40
5.4.230.0080.03612.40
5.4.220.0090.03712.40
5.4.210.0070.03512.40
5.4.200.0060.04212.39
5.4.190.0060.03612.40
5.4.180.0050.03812.39
5.4.170.0060.03712.40
5.4.160.0050.03812.40
5.4.150.0080.04012.39
5.4.140.0070.03812.08
5.4.130.0070.03512.07
5.4.120.0060.03712.02
5.4.110.0090.03412.02
5.4.100.0070.03612.02
5.4.90.0100.03512.02
5.4.80.0060.03912.02
5.4.70.0060.03512.02
5.4.60.0040.03612.02
5.4.50.0060.03912.02
5.4.40.0030.03912.01
5.4.30.0080.04212.00
5.4.20.0040.04212.00
5.4.10.0080.03912.00
5.4.00.0080.03711.49
5.3.290.0050.03912.80
5.3.280.0080.03612.71
5.3.270.0100.03512.72
5.3.260.0070.04412.72
5.3.250.0050.04012.72
5.3.240.0080.03512.72
5.3.230.0080.03512.71
5.3.220.0060.03712.68
5.3.210.0060.03912.68
5.3.200.0080.03912.68
5.3.190.0050.03812.68
5.3.180.0060.03812.68
5.3.170.0080.04312.67
5.3.160.0080.03612.67
5.3.150.0050.03912.67
5.3.140.0020.04112.66
5.3.130.0060.03912.66
5.3.120.0070.03712.65
5.3.110.0060.03812.66
5.3.100.0070.03812.12
5.3.90.0100.03312.10
5.3.80.0070.04112.09
5.3.70.0080.03412.09
5.3.60.0060.04512.08
5.3.50.0070.03512.02
5.3.40.0040.03812.02
5.3.30.0070.04111.98
5.3.20.0060.03511.76
5.3.10.0060.03411.73
5.3.00.0050.03611.71
5.2.170.0030.0319.18
5.2.160.0060.0289.18
5.2.150.0030.0319.18
5.2.140.0060.0299.18
5.2.130.0060.0279.14
5.2.120.0030.0299.14
5.2.110.0060.0289.14
5.2.100.0050.0289.14
5.2.90.0040.0299.14
5.2.80.0040.0319.14
5.2.70.0070.0279.14
5.2.60.0070.0279.09
5.2.50.0040.0329.06
5.2.40.0050.0319.03
5.2.30.0040.0309.01
5.2.20.0060.0299.01
5.2.10.0040.0298.93
5.2.00.0060.0328.78
5.1.60.0060.0328.06
5.1.50.0100.0338.06
5.1.40.0050.0338.05
5.1.30.0070.0348.39
5.1.20.0040.0378.41
5.1.10.0040.0268.14
5.1.00.0090.0308.14
5.0.50.0050.0276.62
5.0.40.0030.0286.47
5.0.30.0060.0386.29
5.0.20.0040.0236.26
5.0.10.0050.0196.24
5.0.00.0030.0316.23
4.4.90.0020.0174.77
4.4.80.0040.0144.75
4.4.70.0030.0154.76
4.4.60.0010.0184.75
4.4.50.0030.0164.77
4.4.40.0000.0284.70
4.4.30.0030.0154.76
4.4.20.0020.0164.84
4.4.10.0000.0194.85
4.4.00.0040.0244.76
4.3.110.0030.0154.67
4.3.100.0010.0174.67
4.3.90.0030.0144.64
4.3.80.0040.0234.59
4.3.70.0020.0154.63
4.3.60.0030.0144.63
4.3.50.0030.0154.63
4.3.40.0010.0264.53
4.3.30.0000.0183.29
4.3.20.0010.0173.26
4.3.10.0020.0163.22
4.3.00.0100.01035.00

preferences:
44.95 ms | 401 KiB | 5 Q