3v4l.org

run code in 300+ PHP versions simultaneously
<?php class B { public function method() { echo "BBB"; } } class A { public function method() { echo "I'not suppose to"; } } class TestParentClass extends A { public function method() { print_r('Parent method'); print "\n"; } } trait TestTrait { public function method() { print_r('Trait method'); print "\n"; } } class TestChildClass extends TestParentClass { use TestTrait { A::method as mth; /* TestTrait::method as methodAlias; TestParentClass::method insteadof TestTrait; */ } } //(new TestChildClass)->mth(); (new TestChildClass)->method(); (new TestChildClass)->method(); (new TestChildClass)->methodAlias();

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.0110.00318.55
8.3.50.0100.00922.11
8.3.40.0180.00318.67
8.3.30.0140.00018.68
8.3.20.0000.00818.65
8.3.10.0040.00419.17
8.3.00.0040.00421.74
8.2.180.0130.00316.50
8.2.170.0130.00322.96
8.2.160.0000.01320.44
8.2.150.0090.00624.18
8.2.140.0000.00724.66
8.2.130.0040.00426.16
8.2.120.0070.00319.10
8.2.110.0030.00619.23
8.1.280.0070.01125.92
8.1.270.0040.00423.99
8.1.260.0040.01126.35
8.1.250.0040.00428.09
8.1.240.0070.00419.01
7.4.10.0110.01116.27
7.4.00.0110.00715.40
7.3.130.0000.02616.34
7.3.120.0060.01315.25
7.3.110.0140.00915.49
7.3.100.0140.00615.54
7.3.90.0110.00915.52
7.3.80.0040.01415.52
7.3.70.0170.00515.46
7.3.60.0090.01015.46
7.3.50.0060.01115.49
7.3.40.0110.00815.33
7.3.30.0120.00815.58
7.3.20.0170.00616.36
7.3.10.0150.00816.36
7.3.00.0190.00616.42
7.2.260.0170.00816.28
7.2.250.0130.01115.74
7.2.240.0120.01215.74
7.2.230.0120.00715.68
7.2.220.0090.00915.58
7.2.210.0120.01015.56
7.2.200.0060.01415.66
7.2.190.0070.01015.46
7.2.180.0050.01115.69
7.2.170.0110.00915.66
7.2.160.0190.01616.38
7.2.150.0370.00616.55
7.2.140.0280.00916.54
7.2.130.0150.00716.62
7.2.120.0170.01216.45
7.2.110.0150.00816.75
7.2.100.1050.00816.58
7.2.90.0200.00916.73
7.2.80.0280.00814.10
7.2.70.0090.00814.19
7.2.60.0160.00514.95
7.2.50.0270.00514.28
7.2.40.0090.00314.17
7.2.30.0120.00414.11
7.2.20.0130.01016.50
7.2.10.0150.00416.64
7.2.00.0070.01616.62
7.1.330.0660.00615.46
7.1.320.0230.00915.44
7.1.310.1480.00515.70
7.1.300.0960.01115.49
7.1.290.0780.00515.70
7.1.280.0150.01615.46
7.1.270.0140.01415.64
7.1.260.0150.01015.47
7.1.250.0100.00915.54
7.1.240.0540.01315.50
7.1.230.0160.01315.31
7.1.220.0170.00815.41
7.1.210.0400.01015.21
7.1.200.0270.00215.45
7.1.190.0240.01215.46
7.1.180.0180.00915.32
7.1.170.0560.01515.45
7.1.160.0340.00615.27
7.1.150.0300.01115.42
7.1.140.0180.01515.50
7.1.130.0120.01815.41
7.1.120.0400.00915.40
7.1.110.0530.00415.49
7.1.100.0720.00917.45
7.1.90.0170.01315.61
7.1.80.0250.00315.21
7.1.70.0100.00816.27
7.1.60.0150.01118.27
7.1.50.0210.01215.99
7.1.40.0190.00817.25
7.1.30.0180.00815.38
7.1.20.0240.01215.34
7.1.10.0340.00711.65
7.1.00.0170.04318.77
7.0.330.0440.01015.02
7.0.320.0740.01015.20
7.0.310.0210.00811.65
7.0.300.0180.00915.13
7.0.290.0440.01615.20
7.0.280.0690.01115.11
7.0.270.0160.01615.18
7.0.260.0220.01115.06
7.0.250.0250.00715.25
7.0.240.2110.02215.12
7.0.230.0450.01415.29
7.0.220.0840.01215.15
7.0.210.0250.00815.17
7.0.200.0380.00515.92
7.0.190.0250.00311.65
7.0.180.0310.01715.05
7.0.170.0200.01715.03
7.0.160.0240.00616.88
7.0.150.0560.01014.88
7.0.140.0150.04018.57
7.0.130.0330.01115.27
7.0.120.0180.01216.89
7.0.110.0650.01415.01
7.0.100.0570.01115.11
7.0.90.0460.01315.20
7.0.80.0160.01016.84
7.0.70.0470.02818.34
7.0.60.0390.04518.43
7.0.50.0170.04716.88
7.0.40.0150.04215.86
7.0.30.0110.03317.46
7.0.20.0180.02117.46
7.0.10.0120.04117.48
7.0.00.0150.04517.49
5.6.400.0140.01415.77
5.6.390.0130.00911.65
5.6.380.0200.00815.73
5.6.370.0210.00615.73
5.6.360.0110.01515.68
5.6.350.0110.01515.95
5.6.340.0220.01215.59
5.6.330.0270.00715.98
5.6.320.0210.01215.71
5.6.310.0170.00711.65
5.6.300.0140.00311.65
5.6.290.0120.00611.65
5.6.280.0160.03918.43
5.6.270.0170.01315.61
5.6.260.0210.00715.69
5.6.250.0180.01115.57
5.6.240.0100.01615.82
5.6.230.0130.01315.89
5.6.220.0090.04718.09
5.6.210.0090.03218.21
5.6.200.0120.03618.35
5.6.190.0110.04618.47
5.6.180.0170.04418.54
5.6.170.0100.04618.31
5.6.160.0140.04518.43
5.6.150.0100.05018.53
5.6.140.0080.03116.33
5.6.130.0070.04118.46
5.6.120.0100.03718.33
5.6.110.0060.03518.29
5.6.100.0080.03818.45
5.6.90.0080.04416.29
5.6.80.0090.04018.05
5.6.70.0090.04218.10
5.6.60.0050.04215.97
5.6.50.0190.03516.04
5.6.40.0080.04818.06
5.6.30.0130.04418.07
5.6.20.0110.04218.08
5.6.10.0100.04517.99
5.6.00.0070.04116.03
5.5.380.0200.01115.84
5.5.370.0220.00715.63
5.5.360.0130.04518.03
5.5.350.0160.04217.97
5.5.340.0130.04518.31
5.5.330.0070.05218.31
5.5.320.0070.04318.18
5.5.310.0090.05018.16
5.5.300.0070.03218.23
5.5.290.0080.04918.21
5.5.280.0080.04818.24
5.5.270.0120.02318.25
5.5.260.0080.04918.28
5.5.250.0110.04818.22
5.5.240.0110.04317.95
5.5.230.0070.04717.90
5.5.220.0120.02417.88
5.5.210.0080.02817.83
5.5.200.0140.03817.92
5.5.190.0120.04617.71
5.5.180.0110.04617.84
5.5.170.0210.00315.67
5.5.160.0090.04417.90
5.5.150.0140.02917.66
5.5.140.0070.03218.00
5.5.130.0120.02717.98
5.5.120.0060.03317.86
5.5.110.0070.04217.93
5.5.100.0070.04317.85
5.5.90.0070.04417.79
5.5.80.0070.03017.86
5.5.70.0040.04817.85
5.5.60.0080.02517.82
5.5.50.0050.02717.88
5.5.40.0090.02317.93
5.5.30.0140.02017.74
5.5.20.0050.03117.80
5.5.10.0120.04017.79
5.5.00.0100.04417.82
5.4.450.0040.03316.00
5.4.440.0080.04515.93
5.4.430.0090.02415.86
5.4.420.0060.03215.82
5.4.410.0060.04415.84
5.4.400.0050.03815.68
5.4.390.0070.03315.62
5.4.380.0050.03815.63
5.4.370.0080.04015.77
5.4.360.0090.04115.58
5.4.350.0090.03615.52
5.4.340.0060.04115.85
5.4.330.0160.00012.39
5.4.320.0040.04515.64
5.4.310.0070.03615.61
5.4.300.0060.02815.74
5.4.290.0050.04315.61
5.4.280.0060.04515.74
5.4.270.0100.03915.67
5.4.260.0080.04115.74
5.4.250.0090.04015.72
5.4.240.0070.02615.72
5.4.230.0040.03915.79
5.4.220.0060.03315.56
5.4.210.0070.04015.85
5.4.200.0070.02215.62
5.4.190.0080.02115.80
5.4.180.0050.03815.67
5.4.170.0070.03315.61
5.4.160.0040.04215.67
5.4.150.0080.03615.68
5.4.140.0090.03914.41
5.4.130.0110.03714.47
5.4.120.0090.02914.54
5.4.110.0070.02714.32
5.4.100.0070.02714.51
5.4.90.0080.03514.45
5.4.80.0060.03814.46
5.4.70.0100.03514.50
5.4.60.0080.03714.50
5.4.50.0080.04114.42
5.4.40.0030.04014.52
5.4.30.0060.03514.38
5.4.20.0080.02814.46
5.4.10.0060.03014.44
5.4.00.0120.02214.17
5.3.290.0090.03513.86
5.3.280.0090.02613.69
5.3.270.0090.03613.71
5.3.260.0080.03813.77
5.3.250.0080.03813.64
5.3.240.0070.03513.69
5.3.230.0090.04213.56
5.3.220.0060.02913.73
5.3.210.0100.04013.57
5.3.200.0060.04513.78
5.3.190.0090.03913.69
5.3.180.0060.04213.70
5.3.170.0060.04013.79
5.3.160.0080.02313.75
5.3.150.0080.02913.81
5.3.140.0110.03913.71
5.3.130.0060.03813.69
5.3.120.0090.02913.85
5.3.110.0030.04713.71
5.3.100.0020.04213.43
5.3.90.0040.03713.63
5.3.80.0060.02213.33
5.3.70.0050.02813.36
5.3.60.0120.03813.41
5.3.50.0050.04413.37
5.3.40.0100.04013.31
5.3.30.0060.04413.30
5.3.20.0020.04413.20
5.3.10.0080.03713.07
5.3.00.0070.02813.22
5.2.170.0070.05712.21
5.2.160.0070.05312.21
5.2.150.0030.06312.21
5.2.140.0100.06012.21
5.2.130.0030.05012.21
5.2.120.0030.03012.21
5.2.110.0030.03312.21
5.2.100.0000.04012.21
5.2.90.0000.06312.21
5.2.80.0000.04312.21
5.2.70.0030.05712.21
5.2.60.0030.06012.21
5.2.50.0030.04712.21
5.2.40.0070.04012.21
5.2.30.0030.06012.21
5.2.20.0030.04312.21
5.2.10.0070.05312.21
5.2.00.0070.06012.21
5.1.60.0000.05712.21
5.1.50.0000.05712.21
5.1.40.0000.05012.21
5.1.30.0030.05712.21
5.1.20.0030.04312.21
5.1.10.0030.03712.21
5.1.00.0030.05312.21
5.0.50.0030.03312.21
5.0.40.0000.04712.21
5.0.30.0030.05712.21
5.0.20.0000.04312.21
5.0.10.0030.04012.21
5.0.00.0100.05312.21
4.4.90.0000.03312.21
4.4.80.0030.03012.21
4.4.70.0030.02712.21
4.4.60.0070.02012.21
4.4.50.0030.03312.21
4.4.40.0000.04712.21
4.4.30.0070.02312.21
4.4.20.0030.02712.21
4.4.10.0030.03312.21
4.4.00.0000.03712.21
4.3.110.0030.03712.21
4.3.100.0000.03012.21
4.3.90.0000.03312.21
4.3.80.0000.05712.21
4.3.70.0000.03312.21
4.3.60.0030.03012.21
4.3.50.0000.02712.21
4.3.40.0000.05312.21
4.3.30.0030.03712.21
4.3.20.0000.03712.21
4.3.10.0000.03012.21
4.3.00.0000.02712.21

preferences:
37.64 ms | 401 KiB | 5 Q