3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Test1 { public function test1() { echo $this->test; } } trait Test2 { public function test1() { echo $this->test; } } class Foo { private $test = "bar"; use Test1; } class Bar extends Foo { use Test2; } (new Foo())->test1(); (new Bar())->test2();

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.40.0100.01018.58
8.3.30.0030.01218.80
8.3.20.0040.00418.73
8.3.10.0040.00418.69
8.3.00.0030.00619.38
8.2.170.0090.00622.96
8.2.160.0070.00718.91
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0020.00521.00
8.2.110.0030.00719.37
8.2.100.0130.00317.72
8.2.90.0060.00318.34
8.2.80.0000.00719.38
8.2.70.0030.00617.50
8.2.60.0060.00317.93
8.2.50.0080.00018.07
8.2.40.0040.00418.22
8.2.30.0070.00017.92
8.2.20.0060.00317.60
8.2.10.0040.00417.67
8.2.00.0040.00417.68
8.1.270.0040.00423.99
8.1.260.0110.00626.35
8.1.250.0040.00428.09
8.1.240.0000.00822.20
8.1.230.0070.00420.89
8.1.220.0000.00817.74
8.1.210.0040.00418.91
8.1.200.0060.00317.25
8.1.190.0070.00017.53
8.1.180.0040.00418.10
8.1.170.0070.00018.76
8.1.160.0050.00218.89
8.1.150.0030.00518.57
8.1.140.0070.00017.50
8.1.130.0000.00717.75
8.1.120.0070.00017.30
8.1.110.0030.00517.27
8.1.100.0070.00017.36
8.1.90.0040.00417.30
8.1.80.0030.00517.42
8.1.70.0030.00317.36
8.1.60.0040.00417.53
8.1.50.0070.00017.32
8.1.40.0000.00717.48
8.1.30.0040.00417.57
8.1.20.0040.00417.43
8.1.10.0020.00517.51
8.1.00.0000.00717.51
8.0.300.0070.00019.96
8.0.290.0040.00416.75
8.0.280.0000.00818.45
8.0.270.0050.00217.21
8.0.260.0000.00716.80
8.0.250.0000.00717.06
8.0.240.0000.00716.92
8.0.230.0070.00016.97
8.0.220.0000.00817.01
8.0.210.0040.00416.93
8.0.200.0030.00316.90
8.0.190.0030.00417.04
8.0.180.0060.00316.98
8.0.170.0040.00416.84
8.0.160.0040.00416.97
8.0.150.0000.00716.94
8.0.140.0070.00316.89
8.0.130.0000.00613.32
8.0.120.0070.00316.93
8.0.110.0000.00816.84
8.0.100.0050.00216.98
8.0.90.0030.00317.01
8.0.80.0080.00817.02
8.0.70.0070.00016.92
8.0.60.0040.00416.93
8.0.50.0040.00417.02
8.0.30.0030.01417.04
8.0.20.0100.01117.04
8.0.10.0050.00317.09
8.0.00.0090.01116.71
7.4.330.0040.00312.95
7.4.320.0030.00316.46
7.4.300.0030.00316.45
7.4.290.0000.00716.38
7.4.280.0000.00716.45
7.4.270.0000.00716.54
7.4.260.0060.00013.23
7.4.250.0000.00716.44
7.4.240.0030.00316.47
7.4.230.0040.00416.61
7.4.220.0070.02016.46
7.4.210.0090.00616.54
7.4.200.0000.00716.52
7.4.190.0000.00716.63
7.4.160.0100.01016.60
7.4.150.0180.01816.72
7.4.140.0060.01216.50
7.4.130.0110.00616.39
7.4.120.0070.01016.32
7.4.110.0030.01716.34
7.4.100.0150.00616.51
7.4.90.0070.01616.52
7.4.80.0130.00319.39
7.4.70.0150.00616.44
7.4.60.0100.00616.57
7.4.50.0020.00216.27
7.4.40.0060.00916.30
7.4.30.0100.01316.25
7.4.00.0060.00815.07
7.3.330.0060.00013.33
7.3.320.0000.00613.30
7.3.310.0030.00316.21
7.3.300.0070.00016.25
7.3.290.0060.00916.34
7.3.280.0110.00716.44
7.3.270.0140.00316.65
7.3.260.0110.00716.55
7.3.250.0120.00816.50
7.3.240.0130.00316.54
7.3.230.0160.00416.37
7.3.210.0140.00316.37
7.3.200.0070.01016.61
7.3.190.0030.01216.46
7.3.180.0000.01616.53
7.3.170.0110.00616.58
7.3.160.0130.00316.44
7.3.120.0130.00314.98
7.3.10.0000.01016.64
7.3.00.0070.00716.47
7.2.330.0140.00716.75
7.2.320.0100.01416.38
7.2.310.0060.01716.44
7.2.300.0100.00716.46
7.2.290.0030.01316.36
7.2.130.0000.01516.97
7.2.120.0120.00316.68
7.2.110.0100.00316.78
7.2.100.0110.00716.43
7.2.90.0000.01417.00
7.2.80.0080.00416.99
7.2.70.0000.01216.52
7.2.60.0050.00816.88
7.2.50.0090.00616.86
7.2.40.0030.01016.66
7.2.30.0060.00916.65
7.2.20.0110.00016.60
7.2.10.0070.00716.94
7.2.00.0100.00418.11
7.1.250.0030.00715.63
7.1.200.0000.00815.64
7.1.100.0040.00417.99
7.1.70.0040.00416.84
7.1.60.0100.01019.30
7.1.50.0000.01116.71
7.1.00.0030.03722.32
7.0.200.0070.00516.80
7.0.140.0030.06721.92
7.0.120.0030.07021.95
7.0.60.0070.08720.09
7.0.50.0030.07017.86
7.0.40.0170.08320.11
7.0.30.0200.04020.08
7.0.20.0200.10020.23
7.0.10.0170.07720.07
7.0.00.0130.07320.27
5.6.280.0000.07721.04
5.6.210.0000.04320.76
5.6.200.0030.08718.19
5.6.190.0030.04720.39
5.6.180.0270.04020.42
5.6.170.0300.04720.52
5.6.160.0100.08020.54
5.6.150.0070.08018.16
5.6.140.0030.08718.27
5.6.130.0070.07318.17
5.6.120.0030.04721.04
5.6.110.0070.09021.11
5.6.100.0030.08020.96
5.6.90.0130.08020.96
5.6.80.0130.07720.38
5.6.70.1300.03320.40
5.5.350.0130.03320.47
5.5.340.0030.04017.93
5.5.330.0070.04720.38
5.5.320.0200.04320.30
5.5.310.0370.07720.35
5.5.300.0030.05718.04
5.5.290.0000.08717.93
5.5.280.0070.06020.81
5.5.270.0130.07720.69
5.5.260.0000.07720.77
5.5.250.0130.05720.70
5.5.240.0030.07720.05
5.4.450.0130.06019.20
5.4.440.0070.07319.46
5.4.430.0100.06719.29
5.4.420.0030.06019.47
5.4.410.0100.04319.20
5.4.400.0100.05319.14
5.4.390.0030.04719.14
5.4.380.0000.05318.92
5.4.370.0030.06018.90
5.4.360.0100.04019.24
5.4.350.0100.03318.85
5.4.340.0000.04719.25
5.4.320.0100.06319.28
5.4.310.0030.04018.88
5.4.300.0100.06719.12
5.4.290.0130.07319.14
5.4.280.0070.08019.25
5.4.270.0070.07319.14
5.4.260.0170.06319.19
5.4.250.0030.06018.85
5.4.240.0070.05019.21
5.4.230.0030.08318.97
5.4.220.0030.07718.91
5.4.210.0030.05719.11
5.4.200.0130.06718.91
5.4.190.0030.06318.91
5.4.180.0070.04718.84
5.4.170.0130.05718.87
5.4.160.0070.07318.83
5.4.150.0100.07319.21
5.4.140.0030.04016.37
5.4.130.0100.07016.34
5.4.120.0130.05716.39
5.4.110.0070.07016.57
5.4.100.0070.07316.52
5.4.90.0100.07016.43
5.4.80.0030.07316.45
5.4.70.0030.04016.53
5.4.60.0000.06316.45
5.4.50.0070.03316.38
5.4.40.0000.08016.31
5.4.30.0030.04716.42
5.4.20.0070.07016.25
5.4.10.0070.06716.38
5.4.00.0070.05715.96
5.3.290.0100.07714.64
5.3.280.0000.04314.68
5.3.270.0030.07014.69
5.3.260.0100.03714.43
5.3.250.0070.04014.53
5.3.240.0100.07314.57
5.3.230.0130.07014.56
5.3.220.0070.03714.51
5.3.210.0000.05014.51
5.3.200.0070.05014.50
5.3.190.0030.04714.45
5.3.180.0000.07714.50
5.3.170.0070.07314.48
5.3.160.0000.04014.51
5.3.150.0070.07314.48
5.3.140.0070.03314.35
5.3.130.0000.04314.53
5.3.120.0100.07014.50
5.3.110.0030.05014.56
5.3.100.0070.04013.97
5.3.90.0070.04013.95
5.3.80.0130.06313.96
5.3.70.0070.06313.85
5.3.60.0000.07314.09
5.3.50.0070.07013.78
5.3.40.0030.07313.97
5.3.30.0070.06713.85
5.3.20.0030.04713.63
5.3.10.0070.07713.48
5.3.00.0070.05313.73
5.2.170.0070.05711.07
5.2.160.0070.05311.05
5.2.150.0030.05711.07
5.2.140.0000.04711.04
5.2.130.0030.05711.00
5.2.120.0070.05011.08
5.2.110.0000.05010.99
5.2.100.0070.04011.09
5.2.90.0030.04711.11
5.2.80.0100.02311.02
5.2.70.0000.03310.95
5.2.60.0130.05311.04
5.2.50.0000.06711.00
5.2.40.0030.06710.92
5.2.30.0070.06311.12
5.2.20.0070.03010.88
5.2.10.0030.04310.94
5.2.00.0070.05010.76
5.1.60.0070.0509.95
5.1.50.0070.0479.89
5.1.40.0100.02710.02
5.1.30.0100.04010.38
5.1.20.0070.02710.23
5.1.10.0030.03010.22
5.1.00.0030.06010.07
5.0.50.0130.0278.53
5.0.40.0070.0208.38
5.0.30.0030.0638.16
5.0.20.0130.0378.10
5.0.10.0030.0308.13
5.0.00.0030.0608.16
4.4.90.0030.0137.62
4.4.80.0030.0337.62
4.4.70.0030.0337.62
4.4.60.0030.0207.62
4.4.50.0070.0307.62
4.4.40.0030.0507.62
4.4.30.0030.0277.62
4.4.20.0100.0277.62
4.4.10.0070.0337.62
4.4.00.0030.0577.62
4.3.110.0000.0207.62
4.3.100.0030.0207.62
4.3.90.0000.0277.62
4.3.80.0000.0337.62
4.3.70.0030.0307.62
4.3.60.0030.0237.62
4.3.50.0000.0207.62
4.3.40.0030.0307.62
4.3.30.0030.0307.62
4.3.20.0070.0307.62
4.3.10.0000.0307.62
4.3.00.0000.0337.62

preferences:
45.6 ms | 400 KiB | 5 Q