3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo\Bar { class Baz {} } namespace { function byReflection($obj) { $r = new ReflectionObject($obj); return $r->getName(); } function byString($obj) { $class = get_class($obj); return substr($class, strrpos($class, '\\')); } $a = new StdClass; $b = new Foo\Bar\Baz; var_dump(byReflection($a), byString($a), byReflection($b), byString($b)); }

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.0120.00318.43
8.3.50.0120.00722.00
8.3.40.0040.01118.54
8.3.30.0110.00419.07
8.3.20.0040.00420.25
8.3.10.0040.00422.05
8.3.00.0000.00822.58
8.2.180.0120.00316.75
8.2.170.0040.01122.96
8.2.160.0100.00720.75
8.2.150.0080.00024.18
8.2.140.0060.00324.66
8.2.130.0030.00626.16
8.2.120.0080.00019.25
8.2.110.0060.00322.07
8.2.100.0040.00717.78
8.2.90.0040.00419.09
8.2.80.0000.00817.97
8.2.70.0040.00417.63
8.2.60.0000.00917.80
8.2.50.0030.00618.07
8.2.40.0000.00818.03
8.2.30.0000.00717.89
8.2.20.0000.00817.67
8.2.10.0070.00017.56
8.2.00.0050.00317.63
8.1.280.0110.00725.92
8.1.270.0000.00823.96
8.1.260.0030.00626.35
8.1.250.0000.00828.09
8.1.240.0040.00723.82
8.1.230.0100.00418.98
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0000.00917.23
8.1.190.0060.00317.50
8.1.180.0040.00418.10
8.1.170.0000.01218.59
8.1.160.0000.00721.90
8.1.150.0070.00018.65
8.1.140.0040.00417.32
8.1.130.0030.00317.82
8.1.120.0040.00417.32
8.1.110.0040.00417.30
8.1.100.0030.00517.34
8.1.90.0040.00317.43
8.1.80.0000.00717.31
8.1.70.0070.00017.30
8.1.60.0030.00617.43
8.1.50.0000.00717.46
8.1.40.0000.00817.52
8.1.30.0030.00917.65
8.1.20.0090.00017.62
8.1.10.0000.00717.42
8.1.00.0080.00017.36
8.0.300.0000.00718.77
8.0.290.0000.00817.05
8.0.280.0000.00818.35
8.0.270.0040.00417.20
8.0.260.0040.00416.77
8.0.250.0030.00316.80
8.0.240.0030.00516.93
8.0.230.0000.00716.84
8.0.220.0000.00716.89
8.0.210.0070.00016.86
8.0.200.0000.00716.84
8.0.190.0070.00016.89
8.0.180.0060.00316.82
8.0.170.0030.00516.86
8.0.160.0080.00016.87
8.0.150.0030.00416.82
8.0.140.0000.00716.84
8.0.130.0030.00313.21
8.0.120.0040.00416.68
8.0.110.0040.00416.84
8.0.100.0040.00416.87
8.0.90.0000.00716.88
8.0.80.0120.00916.89
8.0.70.0000.00816.76
8.0.60.0000.00716.73
8.0.50.0040.00416.68
8.0.30.0160.00317.06
8.0.20.0100.01017.40
8.0.10.0070.00016.76
8.0.00.0050.01316.79
7.4.330.0000.00515.03
7.4.320.0060.00016.60
7.4.300.0000.00716.50
7.4.290.0070.00016.51
7.4.280.0040.00416.52
7.4.270.0030.00316.52
7.4.260.0040.00416.59
7.4.250.0080.00016.47
7.4.240.0000.00716.48
7.4.230.0000.00716.59
7.4.220.0070.01116.55
7.4.210.0080.00616.60
7.4.200.0050.00216.43
7.4.190.0030.00316.59
7.4.160.0080.00816.22
7.4.150.0100.01317.40
7.4.140.0080.01217.86
7.4.130.0060.01216.46
7.4.120.0110.01216.39
7.4.110.0030.01316.48
7.4.100.0100.00716.50
7.4.90.0090.00916.32
7.4.80.0140.00519.39
7.4.70.0140.00716.36
7.4.60.0080.00816.33
7.4.50.0030.00316.43
7.4.40.0030.01322.77
7.4.30.0000.01716.53
7.4.00.0080.00814.85
7.3.330.0050.00013.17
7.3.320.0000.00513.17
7.3.310.0030.00316.31
7.3.300.0030.00316.27
7.3.290.0090.01116.27
7.3.280.0080.00716.27
7.3.270.0060.01117.40
7.3.260.0030.01416.48
7.3.250.0110.00816.41
7.3.240.0140.00316.37
7.3.230.0080.00816.69
7.3.210.0060.00916.31
7.3.200.0110.00619.39
7.3.190.0100.00716.31
7.3.180.0100.00716.44
7.3.170.0120.00916.64
7.3.160.0060.01016.32
7.3.120.0060.01114.77
7.3.110.0000.01415.05
7.3.100.0070.01114.65
7.3.90.0000.01514.89
7.3.80.0060.00615.02
7.3.70.0100.00314.80
7.3.60.0060.00614.88
7.3.50.0030.01014.93
7.3.40.0070.00414.78
7.3.30.0030.00714.75
7.3.20.0080.00416.32
7.3.10.0100.00316.68
7.3.00.0110.00416.89
7.2.330.0180.00016.70
7.2.320.0100.01316.59
7.2.310.0130.01016.67
7.2.300.0100.00716.35
7.2.290.0110.00616.54
7.2.250.0080.00815.13
7.2.240.0070.01314.92
7.2.230.0030.01014.83
7.2.220.0030.01015.04
7.2.210.0030.01214.95
7.2.200.0130.00015.06
7.2.190.0030.00915.04
7.2.180.0090.00014.97
7.2.170.0000.01414.64
7.2.60.0070.00716.89
7.2.00.0070.01019.26
7.1.330.0030.01015.62
7.1.320.0120.00415.70
7.1.310.0060.00315.93
7.1.300.0040.00715.60
7.1.290.0060.01015.80
7.1.280.0070.01015.63
7.1.270.0060.00615.59
7.1.260.0080.00815.76
7.1.200.0130.00815.28
7.1.100.0050.00518.07
7.1.70.0030.00317.18
7.1.60.0090.01619.82
7.1.50.0210.00316.63
7.1.00.0030.07022.54
7.0.200.0040.00416.67
7.0.140.0070.06722.18
7.0.60.0070.05719.93
7.0.50.0100.07717.78
7.0.40.0130.04320.23
7.0.30.0330.06720.09
7.0.20.0270.04320.07
7.0.10.0230.08020.02
7.0.00.0030.06020.25
5.6.280.0070.07021.10
5.6.210.0130.06320.68
5.6.200.0170.07018.29
5.6.190.0070.08720.33
5.6.180.3470.04020.48
5.6.170.0230.03720.51
5.6.160.0030.04320.46
5.6.150.0070.05318.15
5.6.140.0100.03718.12
5.6.130.0100.07718.16
5.6.120.0070.05320.99
5.6.110.0070.08320.98
5.6.100.0030.09021.02
5.6.90.0070.07720.99
5.6.80.0100.08020.51
5.6.70.4400.04020.49
5.5.350.0030.08020.34
5.5.340.0130.07317.96
5.5.330.0100.07720.13
5.5.320.0370.05720.27
5.5.310.0370.06320.38
5.5.300.0200.05318.07
5.5.290.0130.07717.99
5.5.280.0070.08720.86
5.5.270.0130.07720.87
5.5.260.0100.08020.79
5.5.250.0000.04320.70
5.5.240.0030.06020.12
5.4.450.0300.04719.42
5.4.440.0930.04719.46
5.4.430.0400.04319.30
5.4.420.0370.03719.30
5.4.410.0200.05718.96
5.4.400.0300.05018.77
5.4.390.0130.05318.80
5.4.380.0130.05318.78
5.4.370.0300.04318.73
5.4.360.0230.04718.70
5.4.350.0230.05018.50
5.4.340.0200.05718.83
5.4.320.0060.03712.51
5.4.310.0070.03612.51
5.4.300.0070.03512.50
5.4.290.0050.03812.50
5.4.280.0050.03512.41
5.4.270.0140.02812.37
5.4.260.0120.03212.37
5.4.250.0100.03412.37
5.4.240.0070.03512.37
5.4.230.0060.03612.36
5.4.220.0080.03412.36
5.4.210.0060.03512.36
5.4.200.0070.03612.36
5.4.190.0100.03412.35
5.4.180.0090.03312.35
5.4.170.0070.03412.37
5.4.160.0060.03512.37
5.4.150.0050.03612.36
5.4.140.0020.04412.04
5.4.130.0060.03712.03
5.4.120.0010.04311.99
5.4.110.0070.03911.98
5.4.100.0120.04111.98
5.4.90.0090.05011.98
5.4.80.0070.04411.98
5.4.70.0060.03511.98
5.4.60.0060.03511.98
5.4.50.0090.04411.98
5.4.40.0080.04111.97
5.4.30.0060.04011.96
5.4.20.0040.03711.96
5.4.10.0060.03411.96
5.4.00.0090.03711.45
5.3.290.0070.03812.80
5.3.280.0050.04412.71
5.3.270.0110.03912.72
5.3.260.0070.03912.72
5.3.250.0070.03512.72
5.3.240.0090.03612.72
5.3.230.0040.03912.71
5.3.220.0060.03812.68
5.3.210.0070.03812.68
5.3.200.0050.03712.68
5.3.190.0060.04012.68
5.3.180.0080.03512.68
5.3.170.0090.03812.67
5.3.160.0080.03812.67
5.3.150.0040.03912.67
5.3.140.0030.04012.66
5.3.130.0050.03912.66
5.3.120.0060.03812.66
5.3.110.0040.04012.66
5.3.100.0060.03612.11
5.3.90.0060.03512.08
5.3.80.0070.03512.08
5.3.70.0060.03512.07
5.3.60.0040.03712.06
5.3.50.0020.04012.00
5.3.40.0040.04012.00
5.3.30.0050.03611.96
5.3.20.0070.03511.73
5.3.10.0050.03611.70
5.3.00.0050.03611.69
5.2.170.0060.0289.15
5.2.160.0040.0329.15
5.2.150.0080.0299.15
5.2.140.0040.0319.14
5.2.130.0030.0309.11
5.2.120.0040.0289.11
5.2.110.0040.0329.11
5.2.100.0020.0319.11
5.2.90.0050.0289.10
5.2.80.0100.0279.10
5.2.70.0050.0299.10
5.2.60.0060.0289.06
5.2.50.0040.0319.03
5.2.40.0080.0259.00
5.2.30.0080.0318.97
5.2.20.0050.0308.97
5.2.10.0060.0258.89
5.2.00.0040.0288.75
5.1.60.0040.0228.04
5.1.50.0030.0258.03
5.1.40.0000.0308.02
5.1.30.0080.0298.36
5.1.20.0030.0288.40
5.1.10.0040.0258.11
5.1.00.0030.0338.11
5.0.50.0050.0216.59
5.0.40.0030.0206.45
5.0.30.0040.0356.26
5.0.20.0030.0216.23
5.0.10.0040.0266.21
5.0.00.0050.0386.21
4.4.90.0030.0214.77
4.4.80.0030.0154.76
4.4.70.0020.0164.75
4.4.60.0020.0164.75
4.4.50.0020.0174.77
4.4.40.0000.0294.71
4.4.30.0020.0174.76
4.4.20.0030.0224.85
4.4.10.0010.0244.85
4.4.00.0020.0304.75
4.3.110.0040.0154.67
4.3.100.0050.0214.67
4.3.90.0050.0194.63
4.3.80.0040.0264.58
4.3.70.0050.0134.63
4.3.60.0030.0154.63
4.3.50.0020.0174.62
4.3.40.0010.0264.54
4.3.30.0020.0163.27
4.3.20.0020.0183.25
4.3.10.0010.0183.21
4.3.00.0100.01713.28

preferences:
34.25 ms | 401 KiB | 5 Q