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.0070.00718.30
8.3.50.0140.00322.02
8.3.40.0140.00018.84
8.3.30.0100.00318.95
8.3.20.0040.00420.21
8.3.10.0040.00423.53
8.3.00.0140.00719.00
8.2.180.0090.00616.63
8.2.170.0060.00922.96
8.2.160.0000.01420.23
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0190.00026.16
8.2.120.0000.00722.13
8.2.110.0060.00322.02
8.2.100.0080.00317.78
8.2.90.0000.00819.09
8.2.80.0000.00817.97
8.2.70.0040.00417.50
8.2.60.0040.00417.80
8.2.50.0030.00518.07
8.2.40.0060.00318.02
8.2.30.0040.00418.01
8.2.20.0070.00417.72
8.2.10.0000.00717.88
8.2.00.0040.00417.68
8.1.280.0140.00025.92
8.1.270.0040.00423.79
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0090.00023.68
8.1.230.0040.00718.97
8.1.220.0080.00017.74
8.1.210.0040.00418.77
8.1.200.0060.00317.23
8.1.190.0060.00317.39
8.1.180.0080.00018.10
8.1.170.0000.00818.65
8.1.160.0040.00422.02
8.1.150.0030.00518.57
8.1.140.0000.00717.39
8.1.130.0030.00317.63
8.1.120.0000.00717.34
8.1.110.0040.00417.43
8.1.100.0040.00417.43
8.1.90.0070.00017.22
8.1.80.0070.00017.43
8.1.70.0030.00317.30
8.1.60.0000.00817.43
8.1.50.0000.00817.49
8.1.40.0030.00617.36
8.1.30.0080.00017.51
8.1.20.0040.00417.61
8.1.10.0070.00017.27
8.1.00.0040.00417.30
8.0.300.0040.00418.77
8.0.290.0070.00017.18
8.0.280.0000.00718.32
8.0.270.0030.00317.20
8.0.260.0070.00016.82
8.0.250.0060.00016.89
8.0.240.0040.00416.82
8.0.230.0030.00317.00
8.0.220.0000.00616.88
8.0.210.0000.00616.80
8.0.200.0030.00316.84
8.0.190.0000.00716.83
8.0.180.0000.00816.84
8.0.170.0080.00016.88
8.0.160.0000.00816.93
8.0.150.0050.00216.77
8.0.140.0040.00416.89
8.0.130.0000.00513.37
8.0.120.0000.00816.87
8.0.110.0040.00416.85
8.0.100.0070.00016.92
8.0.90.0040.00416.78
8.0.80.0100.00616.82
8.0.70.0080.00016.87
8.0.60.0040.00416.69
8.0.50.0040.00416.88
8.0.30.0070.01317.01
8.0.20.0170.01017.40
8.0.10.0040.00417.04
8.0.00.0100.00816.66
7.4.330.0000.00515.00
7.4.320.0000.00716.52
7.4.300.0000.00716.52
7.4.290.0000.00716.54
7.4.280.0040.00416.54
7.4.270.0000.00716.45
7.4.260.0030.00516.38
7.4.250.0000.00716.45
7.4.240.0040.00416.45
7.4.230.0000.00716.61
7.4.220.0090.00616.58
7.4.210.0070.00916.47
7.4.200.0070.00016.30
7.4.190.0040.00416.60
7.4.160.0090.00916.39
7.4.150.0070.01017.40
7.4.140.0150.00517.86
7.4.130.0040.01416.47
7.4.120.0090.00716.43
7.4.110.0160.00016.43
7.4.100.0070.01116.47
7.4.90.0060.01516.70
7.4.80.0100.01019.39
7.4.70.0090.01216.39
7.4.60.0090.01516.38
7.4.50.0050.00316.45
7.4.40.0070.01122.77
7.4.30.0070.00816.48
7.4.00.0130.00315.05
7.3.330.0050.00013.16
7.3.320.0000.00613.22
7.3.310.0000.00716.40
7.3.300.0030.00316.19
7.3.290.0030.01116.29
7.3.280.0080.01016.30
7.3.270.0070.01417.40
7.3.260.0070.01016.52
7.3.250.0120.00716.56
7.3.240.0030.01316.18
7.3.230.0030.01616.39
7.3.210.0060.01216.42
7.3.200.0110.01119.39
7.3.190.0100.01316.36
7.3.180.0040.01216.32
7.3.170.0130.00816.36
7.3.160.0150.00616.20
7.3.120.0070.00714.71
7.2.330.0090.01216.32
7.2.320.0090.00616.66
7.2.310.0090.00916.57
7.2.300.0100.00616.24
7.2.290.0170.00616.38
7.2.60.0090.00616.71
7.2.00.0030.01319.14
7.1.200.0030.00915.57
7.1.100.0160.00218.04
7.1.70.0050.00316.90
7.1.60.0140.01119.33
7.1.50.0110.00016.62
7.1.00.0100.07022.34
7.0.200.0040.00416.82
7.0.140.0030.07322.19
7.0.60.0100.08020.01
7.0.50.0030.08717.89
7.0.40.0070.08720.13
7.0.30.0230.09020.07
7.0.20.0200.04320.10
7.0.10.0130.08020.33
7.0.00.0100.08020.22
5.6.280.0030.07320.79
5.6.210.0100.08320.63
5.6.200.0000.09018.20
5.6.190.0030.06320.61
5.6.180.0200.04320.58
5.6.170.0130.04720.53
5.6.160.0070.08020.55
5.6.150.0000.06718.27
5.6.140.0070.08018.18
5.6.130.0130.06718.15
5.6.120.0230.06720.99
5.6.110.0070.03721.05
5.6.100.0170.06720.98
5.6.90.0170.06721.13
5.6.80.0030.08020.41
5.6.70.3030.03720.51
5.5.350.0070.07720.47
5.5.340.0030.04317.98
5.5.330.0030.08720.27
5.5.320.0270.05320.20
5.5.310.0200.06020.21
5.5.300.0030.08317.92
5.5.290.0030.09018.03
5.5.280.0170.07720.81
5.5.270.0100.06720.96
5.5.260.0000.06720.77
5.5.250.0130.07320.55
5.5.240.0000.06320.17
5.4.450.3700.02719.55
5.4.440.2370.04319.55
5.4.430.4830.04319.46
5.4.420.3530.04319.27
5.4.410.3770.03719.26
5.4.400.3870.04019.13
5.4.390.3900.04019.31
5.4.380.3870.04319.08
5.4.370.3830.04018.99
5.4.360.3970.04019.15
5.4.350.3600.03318.95
5.4.340.3570.03719.09
5.4.320.3600.03319.13
5.4.310.3700.04019.16
5.4.300.3500.04319.31
5.4.290.2870.03719.20
5.4.280.3800.04019.21
5.4.270.3500.04018.86
5.4.260.3730.03719.19
5.4.250.3800.02719.21
5.4.240.3600.04019.15
5.4.230.3870.03318.94
5.4.220.3270.03718.98
5.4.210.3870.03719.21
5.4.200.3870.03718.98
5.4.190.3700.03718.86
5.4.180.3800.03719.23
5.4.170.3630.04319.08
5.4.160.3700.03318.83
5.4.150.4230.04019.07
5.4.140.3930.03316.38
5.4.130.3730.03016.32
5.4.120.3670.03716.51
5.4.110.3470.05016.50
5.4.100.3900.03316.63
5.4.90.3930.03316.40
5.4.80.3670.03316.49
5.4.70.3970.03316.54
5.4.60.3570.03316.54
5.4.50.3500.03316.37
5.4.40.4000.03016.43
5.4.30.3830.04016.53
5.4.20.3800.03016.23
5.4.10.3170.03716.55
5.4.00.3670.03015.73
5.3.290.3670.03714.57
5.3.280.3870.03714.82
5.3.270.3800.04314.52
5.3.260.3830.04014.64
5.3.250.3930.03714.68
5.3.240.3800.04014.61
5.3.230.3400.04714.67
5.3.220.3800.03714.49
5.3.210.3800.04014.49
5.3.200.3870.04014.54
5.3.190.3900.03314.48
5.3.180.3930.03714.59
5.3.170.3830.03714.54
5.3.160.4170.04014.47
5.3.150.3830.03014.49
5.3.140.3630.03314.57
5.3.130.3700.03014.54
5.3.120.2870.04714.57
5.3.110.3700.03314.55
5.3.100.2930.02714.20
5.3.90.3400.03013.99
5.3.80.3700.02713.95
5.3.70.3670.03013.95
5.3.60.3670.03313.98
5.3.50.3830.04014.00
5.3.40.3900.03313.89
5.3.30.3100.03013.82
5.3.20.3670.03013.60
5.3.10.3830.03713.59
5.3.00.3700.04013.57
5.2.170.2770.02711.11
5.2.160.3070.02711.13
5.2.150.3170.03711.06
5.2.140.3000.02011.05
5.2.130.3470.02011.01
5.2.120.3030.02711.07
5.2.110.3100.01711.11
5.2.100.3470.03311.03
5.2.90.3300.02311.27
5.2.80.3370.03711.18
5.2.70.3370.04011.01
5.2.60.3030.03010.99
5.2.50.2070.03711.00
5.2.40.2630.03010.92
5.2.30.2470.02010.90
5.2.20.2670.03310.92
5.2.10.2370.03010.87
5.2.00.2400.02710.72
5.1.60.2570.0209.93
5.1.50.2570.0279.98
5.1.40.2630.0239.99
5.1.30.2770.02310.25
5.1.20.2700.02310.26
5.1.10.3030.02310.23
5.1.00.3130.02710.05
5.0.50.1770.0179.93
5.0.40.1770.0179.93
5.0.30.1700.0309.93
5.0.20.1730.0239.93
5.0.10.1800.0209.93
5.0.00.1500.0279.93
4.4.90.1270.0139.93
4.4.80.1230.0109.93
4.4.70.0900.0179.93
4.4.60.1400.0179.93
4.4.50.1200.0139.93
4.4.40.1430.0279.93
4.4.30.1270.0139.93
4.4.20.1530.0139.93
4.4.10.1670.0239.93
4.4.00.1770.0239.93
4.3.110.1830.0139.93
4.3.100.1670.0179.93
4.3.90.1570.0179.93
4.3.80.1530.0239.93
4.3.70.1570.0179.93
4.3.60.1500.0209.93
4.3.50.1500.0179.93
4.3.40.1400.0239.93
4.3.30.0400.0279.93
4.3.20.0730.0239.93
4.3.10.0600.0139.93
4.3.00.0730.0279.93

preferences:
46.26 ms | 401 KiB | 5 Q