3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait first_trait { function first_function() { echo "From First Trait\n"; } } trait second_trait { use first_trait { first_trait::first_function as second_function; second_trait::first_function insteadof first_function; } function first_function() { echo "From Second Trait\n"; } } class first_class { use second_trait; } $obj = new first_class(); // Output: From Second Trait $obj->first_function(); // Output: From First Trait $obj->second_function();

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.01016.71
8.3.50.0070.01117.37
8.3.40.0090.00618.89
8.3.30.0110.00418.54
8.3.20.0030.00518.80
8.3.10.0000.00820.36
8.3.00.0080.00019.25
8.2.180.0140.00416.63
8.2.170.0100.00722.96
8.2.160.0170.00322.23
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0120.00326.16
8.2.120.0070.00019.83
8.2.110.0060.00322.29
8.2.100.0080.00417.72
8.2.90.0090.00317.63
8.2.80.0000.00917.97
8.2.70.0050.00317.93
8.2.60.0040.00418.22
8.2.50.0040.00418.10
8.2.40.0070.00018.16
8.2.30.0000.00917.98
8.2.20.0000.00717.57
8.2.10.0000.01017.67
8.2.00.0040.00717.62
8.1.280.0140.00325.92
8.1.270.0070.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00822.19
8.1.230.0000.01219.05
8.1.220.0050.00317.74
8.1.210.0040.00418.77
8.1.200.0070.00317.23
8.1.190.0050.00517.22
8.1.180.0050.00218.10
8.1.170.0040.00418.51
8.1.160.0070.00018.82
8.1.150.0050.00218.48
8.1.140.0040.00417.43
8.1.130.0070.00017.80
8.1.120.0070.00017.29
8.1.110.0040.00417.43
8.1.100.0000.00717.37
8.1.90.0040.00417.37
8.1.80.0000.00717.31
8.1.70.0070.00017.39
8.1.60.0040.00417.51
8.1.50.0030.00517.40
8.1.40.0000.00817.41
8.1.30.0000.00717.58
8.1.20.0030.00617.58
8.1.10.0050.00317.35
8.1.00.0040.00417.31
8.0.300.0040.00421.59
8.0.290.0000.00716.75
8.0.280.0070.00018.36
8.0.270.0040.00416.71
8.0.260.0030.00316.88
8.0.250.0040.00416.96
8.0.240.0000.00916.97
8.0.230.0040.00416.95
8.0.220.0030.00316.89
8.0.210.0030.00616.79
8.0.200.0030.00316.85
8.0.190.0030.00316.85
8.0.180.0000.00716.93
8.0.170.0030.00616.80
8.0.160.0030.00516.84
8.0.150.0060.00316.83
8.0.140.0040.00716.87
8.0.130.0040.00413.27
8.0.120.0030.00516.73
8.0.110.0000.00816.95
8.0.100.0040.00416.80
8.0.90.0040.00416.76
8.0.80.0150.00616.88
8.0.70.0040.00416.95
8.0.60.0000.00716.91
8.0.50.0040.00416.75
8.0.30.0050.01417.12
8.0.20.0120.00517.00
8.0.10.0030.00316.94
8.0.00.0090.00916.69
7.4.330.0050.00012.90
7.4.320.0060.00016.46
7.4.300.0030.00316.44
7.4.290.0070.00016.52
7.4.280.0040.00416.36
7.4.270.0000.00616.41
7.4.260.0000.00613.20
7.4.250.0040.00416.41
7.4.240.0030.00316.52
7.4.230.0080.00016.53
7.4.220.0110.01116.39
7.4.210.0080.00816.53
7.4.200.0080.00016.56
7.4.190.0070.00016.62
7.4.160.0090.00616.50
7.4.150.0110.00616.31
7.4.140.0080.00916.42
7.4.130.0090.00716.40
7.4.120.0050.01316.30
7.4.110.0110.00616.19
7.4.100.0070.01016.43
7.4.90.0100.01016.45
7.4.80.0040.01416.63
7.4.70.0070.01016.14
7.4.60.0040.01916.39
7.4.50.0030.00616.22
7.4.40.0070.00716.28
7.4.30.0120.00316.41
7.4.00.0000.01615.12
7.3.330.0030.00513.19
7.3.320.0000.00513.17
7.3.310.0090.00016.14
7.3.300.0050.00216.24
7.3.290.0060.00916.24
7.3.280.0050.01116.27
7.3.270.0100.00716.64
7.3.260.0100.01116.21
7.3.250.0100.01016.43
7.3.240.0070.01016.34
7.3.230.0120.00416.29
7.3.210.0000.01716.55
7.3.200.0070.01019.39
7.3.190.0150.00316.32
7.3.180.0090.00616.34
7.3.170.0130.00316.38
7.3.160.0000.01516.39
7.3.120.0030.01314.41
7.2.330.0130.00316.55
7.2.320.0130.01016.40
7.2.310.0150.00916.51
7.2.300.0050.01116.61
7.2.290.0060.01016.57
7.2.60.0060.00616.91
7.1.200.0090.00615.55
7.1.100.0030.00917.91
7.1.70.0000.00716.52
7.1.60.0070.01019.40
7.1.50.0170.01334.63
7.1.00.0070.06022.46
7.0.200.0050.00216.69
7.0.140.0000.07722.07
7.0.120.0000.07322.04
7.0.60.0030.04720.06
7.0.50.0030.05017.87
7.0.40.0000.04720.14
7.0.30.0200.04320.11
7.0.20.0170.08320.30
7.0.10.0230.07320.19
7.0.00.0130.07720.07
5.6.280.0000.07720.93
5.6.210.0070.06720.62
5.6.200.0030.05718.16
5.6.190.0070.05020.47
5.6.180.0230.03320.74
5.6.170.0170.04720.50
5.6.160.0100.03320.39
5.6.150.0100.04318.14
5.6.140.0100.07718.17
5.6.130.0300.05018.16
5.6.120.0070.05321.15
5.6.110.0100.08021.09
5.6.100.0130.07720.96
5.6.90.0070.07321.10
5.6.80.0100.07720.37
5.6.70.0200.04720.50
5.5.350.0300.06720.43
5.5.340.0030.08017.99
5.5.330.0070.04320.44
5.5.320.0030.09020.38
5.5.310.0270.06320.28
5.5.300.0070.04018.01
5.5.290.0100.08018.09
5.5.280.0000.04320.89
5.5.270.0000.09320.72
5.5.260.0130.08020.84
5.5.250.0070.07320.46
5.5.240.0030.03720.35
5.4.450.0100.05319.33
5.4.440.0100.07319.56
5.4.430.0070.07319.17
5.4.420.0030.04319.57
5.4.410.0070.05719.17
5.4.400.0100.03719.20
5.4.390.0100.07019.26
5.4.380.0230.03718.92
5.4.370.0070.03719.00
5.4.360.0000.08318.85
5.4.350.0030.04719.14
5.4.340.0070.08019.15
5.4.320.0100.04019.14
5.4.310.0030.04719.16
5.4.300.0030.06319.16
5.4.290.0000.06319.20
5.4.280.0030.04319.14
5.4.270.0000.04319.15
5.4.260.0100.06318.91
5.4.250.0170.06719.23
5.4.240.0030.04019.14
5.4.230.0100.04019.16
5.4.220.0130.06019.24
5.4.210.0070.04318.87
5.4.200.0030.05319.14
5.4.190.0170.06019.13
5.4.180.0100.07019.23
5.4.170.0000.08018.84
5.4.160.0030.04718.90
5.4.150.0000.04319.22
5.4.140.0070.04316.39
5.4.130.0070.03016.37
5.4.120.0070.03316.35
5.4.110.0000.04016.50
5.4.100.0070.03316.58
5.4.90.0170.03016.58
5.4.80.0070.07016.39
5.4.70.0070.03316.45
5.4.60.0100.06716.35
5.4.50.0070.04016.43
5.4.40.0030.04716.37
5.4.30.0000.04016.41
5.4.20.0030.04016.64
5.4.10.0030.04016.27
5.4.00.0130.06315.90
5.3.290.0030.06014.64
5.3.280.0070.06314.53
5.3.270.0030.05714.54
5.3.260.0000.08014.40
5.3.250.0030.03714.54
5.3.240.0000.04014.54
5.3.230.0070.03314.57
5.3.220.0070.06714.50
5.3.210.0130.06714.46
5.3.200.0000.07714.50
5.3.190.0000.04014.47
5.3.180.0070.08014.48
5.3.170.0030.03714.50
5.3.160.0030.04014.49
5.3.150.0030.05314.49
5.3.140.0070.05014.52
5.3.130.0030.03714.47
5.3.120.0130.07014.49
5.3.110.0100.04314.51
5.3.100.0100.06313.97
5.3.90.0030.04013.95
5.3.80.0070.07013.95
5.3.70.0030.07313.89
5.3.60.0030.04313.97
5.3.50.0070.07013.87
5.3.40.0100.04313.87
5.3.30.0030.06313.88
5.3.20.0230.03713.59
5.3.10.0000.04013.74
5.3.00.0030.06313.55
5.2.170.0000.04011.02
5.2.160.0100.05711.23
5.2.150.0030.05311.04
5.2.140.0030.06311.12
5.2.130.0030.06311.09
5.2.120.0070.04011.18
5.2.110.0130.05711.00
5.2.100.0100.05311.11
5.2.90.0070.05711.04
5.2.80.0000.03311.27
5.2.70.0030.05711.03
5.2.60.0100.04310.86
5.2.50.0030.03011.01
5.2.40.0000.03010.99
5.2.30.0000.03010.82
5.2.20.0000.03010.77
5.2.10.0030.03010.86
5.2.00.0030.02710.67
5.1.60.0000.02710.01
5.1.50.0000.0279.90
5.1.40.0000.0279.99
5.1.30.0030.02310.23
5.1.20.0000.02710.50
5.1.10.0030.0279.96
5.1.00.0000.02710.11
5.0.50.0030.0178.47
5.0.40.0000.0208.36
5.0.30.0000.0308.24
5.0.20.0000.0208.16
5.0.10.0030.0208.07
5.0.00.0000.0308.21
4.4.90.0000.0338.05
4.4.80.0000.0178.05
4.4.70.0000.0178.05
4.4.60.0030.0138.05
4.4.50.0030.0138.05
4.4.40.0000.0238.05
4.4.30.0000.0178.05
4.4.20.0000.0178.05
4.4.10.0000.0178.05
4.4.00.0000.0238.05
4.3.110.0000.0138.05
4.3.100.0000.0178.05
4.3.90.0000.0138.05
4.3.80.0000.0238.05
4.3.70.0000.0208.05
4.3.60.0000.0138.05
4.3.50.0000.0178.05
4.3.40.0000.0238.05
4.3.30.0000.0138.05
4.3.20.0030.0138.05
4.3.10.0030.0108.05
4.3.00.0030.0108.05

preferences:
63.41 ms | 401 KiB | 5 Q