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, second_trait { second_trait::first_function insteadof first_function; first_trait::first_function as second_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.0110.00316.75
8.3.50.0140.00722.00
8.3.40.0070.00718.70
8.3.30.0140.00019.14
8.3.20.0050.00220.34
8.3.10.0040.00423.52
8.3.00.0080.00419.23
8.2.180.0120.00617.98
8.2.170.0070.00722.96
8.2.160.0130.00320.52
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0030.01522.13
8.2.110.0060.00321.85
8.2.100.0000.01217.78
8.2.90.0000.00819.22
8.2.80.0000.00917.97
8.2.70.0080.00017.48
8.2.60.0050.00317.80
8.2.50.0000.00818.07
8.2.40.0050.00219.53
8.2.30.0080.00017.90
8.2.20.0050.00217.50
8.2.10.0080.00017.68
8.2.00.0000.00717.68
8.1.280.0070.01325.92
8.1.270.0000.00823.79
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0090.00023.64
8.1.230.0040.00719.03
8.1.220.0030.00517.74
8.1.210.0000.00918.77
8.1.200.0100.00017.23
8.1.190.0040.00417.41
8.1.180.0030.00618.10
8.1.170.0000.00818.64
8.1.160.0000.00722.02
8.1.150.0030.00618.53
8.1.140.0040.00417.25
8.1.130.0000.00717.69
8.1.120.0000.00717.41
8.1.110.0040.00417.28
8.1.100.0070.00317.43
8.1.90.0050.00317.28
8.1.80.0050.00217.35
8.1.70.0070.00017.36
8.1.60.0030.00617.42
8.1.50.0050.00317.39
8.1.40.0000.00717.39
8.1.30.0030.00517.46
8.1.20.0040.00417.41
8.1.10.0030.00517.34
8.1.00.0030.00517.32
8.0.300.0000.00718.77
8.0.290.0050.00217.05
8.0.280.0000.00718.38
8.0.270.0000.00717.26
8.0.260.0000.00616.81
8.0.250.0030.00316.95
8.0.240.0070.00316.91
8.0.230.0030.00316.97
8.0.220.0030.00316.90
8.0.210.0060.00016.84
8.0.200.0000.00616.95
8.0.190.0000.00716.98
8.0.180.0030.00316.77
8.0.170.0000.00816.79
8.0.160.0040.00416.78
8.0.150.0000.00716.89
8.0.140.0110.00016.75
8.0.130.0040.00413.32
8.0.120.0000.00816.70
8.0.110.0030.00316.91
8.0.100.0000.00716.82
8.0.90.0070.00016.91
8.0.80.0150.00016.84
8.0.70.0070.00016.80
8.0.60.0020.00516.77
8.0.50.0000.00816.93
8.0.30.0130.00717.00
8.0.20.0080.01117.40
8.0.10.0020.00517.04
8.0.00.0120.00616.54
7.4.330.0060.00015.00
7.4.320.0000.00616.57
7.4.300.0000.00816.42
7.4.290.0030.00316.43
7.4.280.0000.00716.44
7.4.270.0070.00016.53
7.4.260.0040.00416.43
7.4.250.0000.00716.38
7.4.240.0020.00616.41
7.4.230.0000.00716.61
7.4.220.0030.01416.44
7.4.210.0030.01116.53
7.4.200.0070.00016.53
7.4.190.0030.00316.43
7.4.160.0110.00416.35
7.4.150.0110.00717.40
7.4.140.0100.00617.86
7.4.130.0050.01216.49
7.4.120.0050.01116.58
7.4.110.0070.01016.46
7.4.100.0030.01416.45
7.4.90.0060.01016.38
7.4.80.0100.00719.39
7.4.70.0060.01216.41
7.4.60.0130.00616.37
7.4.50.0000.00916.46
7.4.40.0080.00322.77
7.4.30.0030.01316.50
7.4.00.0150.00014.77
7.3.330.0050.00013.31
7.3.320.0030.00313.24
7.3.310.0030.00316.29
7.3.300.0060.00016.25
7.3.290.0090.00916.23
7.3.280.0100.00716.26
7.3.270.0040.01317.40
7.3.260.0090.01016.37
7.3.250.0080.00916.41
7.3.240.0040.01216.45
7.3.230.0100.00616.39
7.3.210.0100.00616.26
7.3.200.0090.00819.39
7.3.190.0090.01316.30
7.3.180.0000.01516.28
7.3.170.0030.01816.27
7.3.160.0080.00816.35
7.3.120.0040.01114.79
7.3.10.0030.01316.59
7.3.00.0060.00616.44
7.2.330.0140.00416.25
7.2.320.0140.00316.46
7.2.310.0120.00916.28
7.2.300.0110.00616.27
7.2.290.0120.00416.52
7.2.130.0120.00316.50
7.2.120.0060.00916.63
7.2.110.0110.00416.84
7.2.100.0130.00316.88
7.2.90.0070.00716.67
7.2.80.0030.00716.93
7.2.70.0040.01216.54
7.2.60.0090.00816.68
7.2.50.0030.00716.83
7.2.40.0000.01016.85
7.2.30.0100.00616.71
7.2.20.0090.00016.73
7.2.10.0030.01016.63
7.2.00.0060.00718.03
7.1.250.0070.00415.70
7.1.200.0070.00315.66
7.1.70.0130.01017.06
7.1.60.0030.00717.31
7.1.50.0090.00916.83
7.1.00.0030.07722.44
7.0.200.0060.00916.54
7.0.140.0000.07721.92
7.0.70.0000.04721.71
7.0.60.0070.06021.76
7.0.50.0030.08022.04
7.0.40.0100.05320.04
7.0.30.0070.05320.19
7.0.20.0100.08720.04
7.0.10.0100.06020.06
7.0.00.0000.08320.04
5.6.280.0000.07720.91
5.6.220.0000.04320.62
5.6.210.0070.05320.64
5.6.200.0070.08720.99
5.6.190.0130.06020.99
5.6.180.0000.05320.96
5.6.170.0070.07721.05
5.6.160.0030.08321.07
5.6.150.0070.04321.09
5.6.140.0070.08021.02
5.6.130.0030.08721.04
5.6.120.0070.06021.10
5.6.110.0000.09021.05
5.6.100.0070.06321.07
5.6.90.0070.08021.11
5.6.80.0070.08020.44
5.6.70.0070.08320.46
5.6.60.0100.07320.42
5.6.50.0070.08020.42
5.6.40.0100.07320.40
5.6.30.0070.05320.48
5.6.20.0030.05720.36
5.6.10.0030.05320.36
5.6.00.0070.08020.44
5.5.360.0030.04320.49
5.5.350.0130.04320.46
5.5.340.0070.08020.77
5.5.330.0070.08320.83
5.5.320.0070.06720.88
5.5.310.0070.05320.82
5.5.300.0070.05020.79
5.5.290.0100.07320.88
5.5.280.0030.08320.90
5.5.270.0000.07320.89
5.5.260.0070.07720.80
5.5.250.0100.07320.57
5.5.240.0030.07320.27
5.5.230.0030.07320.18
5.5.220.0000.08020.18
5.5.210.0030.08320.15
5.5.200.0130.07020.09
5.5.190.0070.08020.13
5.5.180.0100.07020.11
5.5.160.0030.07020.13
5.5.150.0000.06719.99
5.5.140.0030.07020.21
5.5.130.0070.04020.27
5.5.120.0030.04020.25
5.5.110.0030.05320.20
5.5.100.0030.05720.03
5.5.90.0030.07720.15
5.5.80.0030.08020.11
5.5.70.0000.08720.16
5.5.60.0070.07320.10
5.5.50.0070.04019.96
5.5.40.0030.07719.93
5.5.30.0000.08320.14
5.5.20.0000.07020.05
5.5.10.0100.07720.00
5.5.00.0070.07319.95
5.4.450.0070.07719.53
5.4.440.0000.04319.46
5.4.430.0070.07719.37
5.4.420.0100.07319.27
5.4.410.0100.07319.38
5.4.400.0100.06319.13
5.4.390.0030.08019.20
5.4.380.0100.07019.20
5.4.370.0000.04319.09
5.4.360.0000.06719.12
5.4.350.0000.07018.88
5.4.340.0030.06319.12
5.4.320.0000.04318.87
5.4.310.0000.06019.14
5.4.300.0070.07019.05
5.4.290.0070.05018.84
5.4.280.0130.07318.90
5.4.270.0100.04019.23
5.4.260.0030.05019.13
5.4.250.0030.08019.05
5.4.240.0070.07319.02
5.4.230.0030.07018.89
5.4.220.0070.07319.16
5.4.210.0030.05719.15
5.4.200.0030.07719.11
5.4.190.0030.05318.91
5.4.180.0000.08019.02
5.4.170.0000.07319.02
5.4.160.0000.07019.02
5.4.150.0070.08018.85
5.4.140.0000.07716.24
5.4.130.0030.07716.49
5.4.120.0000.07716.35
5.4.110.0100.06716.52
5.4.100.0030.07316.52
5.4.90.0100.07016.56
5.4.80.0200.06016.47
5.4.70.0100.04716.54
5.4.60.0070.05716.50
5.4.50.0030.03716.44
5.4.40.0030.03316.34
5.4.30.0000.04716.43
5.4.20.0100.03316.30
5.4.10.0000.06016.51
5.4.00.0030.05715.86
5.3.290.0030.07314.66
5.3.280.0000.08014.58
5.3.270.0000.07314.46
5.3.260.0000.08314.43
5.3.250.0000.08014.59
5.3.240.0030.08014.51
5.3.230.0030.06314.58
5.3.220.0000.07714.55
5.3.210.0000.06014.56
5.3.200.0070.07314.55
5.3.190.0000.07714.45
5.3.180.0030.08014.43
5.3.170.0100.06314.57
5.3.160.0070.03314.52
5.3.150.0000.04014.55
5.3.140.0070.06014.42
5.3.130.0100.03014.48
5.3.120.0100.06714.52
5.3.110.0000.04014.52
5.3.100.0130.03713.88
5.3.90.0070.03313.86
5.3.80.0070.03713.92
5.3.70.0000.03713.96
5.3.60.0030.03013.95
5.3.50.0000.03713.94
5.3.40.0000.08013.93
5.3.30.0070.03313.66
5.3.20.0000.04313.55
5.3.10.0000.07013.52
5.3.00.0000.03713.65
5.2.170.0030.02311.02
5.2.160.0000.03010.96
5.2.150.0000.04711.06
5.2.140.0030.06310.96
5.2.130.0000.03010.96
5.2.120.0000.02311.13
5.2.110.0000.05011.09
5.2.100.0000.02711.08
5.2.90.0000.02710.96
5.2.80.0000.03011.02
5.2.70.0000.03011.07
5.2.60.0000.03011.00
5.2.50.0030.02010.96
5.2.40.0070.05010.96
5.2.30.0030.02710.99
5.2.20.0030.03310.96
5.2.10.0070.04310.96
5.2.00.0000.03010.96
5.1.60.0000.02710.96
5.1.50.0000.04010.96
5.1.40.0000.02710.96
5.1.30.0030.02310.96
5.1.20.0030.03010.96
5.1.10.0000.02310.96
5.1.00.0000.02310.96
5.0.50.0000.01710.96
5.0.40.0000.02310.96
5.0.30.0000.04310.96
5.0.20.0000.02010.96
5.0.10.0000.01710.96
5.0.00.0000.03010.96
4.4.90.0000.01710.96
4.4.80.0000.01310.96
4.4.70.0000.01710.96
4.4.60.0030.01010.96
4.4.50.0000.03710.96
4.4.40.0000.02710.96
4.4.30.0000.01310.96
4.4.20.0000.01710.96
4.4.10.0000.01310.96
4.4.00.0000.02310.96
4.3.110.0000.01310.96
4.3.100.0030.01010.96
4.3.90.0030.02710.96
4.3.80.0000.02310.96
4.3.70.0000.01310.96
4.3.60.0000.01310.96
4.3.50.0030.01310.96
4.3.40.0030.02310.96
4.3.30.0000.01310.96
4.3.20.0030.01310.96
4.3.10.0000.01710.96
4.3.00.0000.01710.96

preferences:
40.45 ms | 401 KiB | 5 Q