3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait FooTrait { protected $foo = 'configuration'; protected function doThing() { return $this->foo; } } class Foo { use FooTrait; public function thing() { echo $this->doThing(); } } class Bar extends Foo { protected $foo = 'asdf'; public function thing() { echo $this->doThing(); } } $foo = new Foo(); $foo->thing(); $bar = new Bar(); $bar->thing();

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.0090.00618.65
8.3.30.0030.01020.35
8.3.20.0040.00420.29
8.3.10.0070.00022.00
8.3.00.0110.00422.46
8.2.170.0140.00022.96
8.2.160.0090.00620.38
8.2.150.0040.00424.18
8.2.140.0130.00724.66
8.2.130.0120.00626.16
8.2.120.0000.00819.66
8.2.110.0000.00922.07
8.2.100.0070.00419.26
8.2.90.0050.00319.16
8.2.80.0000.00819.25
8.2.70.0040.00417.50
8.2.60.0040.00418.03
8.2.50.0000.00818.07
8.2.40.0040.00418.22
8.2.30.0000.01018.14
8.2.20.0000.00717.64
8.2.10.0070.00017.55
8.2.00.0000.00817.58
8.1.270.0060.01220.24
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0050.00523.84
8.1.230.0000.01019.01
8.1.220.0030.00617.74
8.1.210.0030.00518.77
8.1.200.0030.00617.22
8.1.190.0000.00817.53
8.1.180.0060.00318.54
8.1.170.0000.00818.59
8.1.160.0070.00022.05
8.1.150.0000.00718.68
8.1.140.0000.00717.49
8.1.130.0000.00817.82
8.1.120.0040.00417.38
8.1.110.0000.00817.38
8.1.100.0050.00317.44
8.1.90.0000.00717.34
8.1.80.0020.00517.46
8.1.70.0040.00417.46
8.1.60.0000.00817.54
8.1.50.0030.00517.43
8.1.40.0030.00617.55
8.1.30.0040.00417.61
8.1.20.0030.00517.60
8.1.10.0040.00417.59
8.1.00.0040.00417.42
8.0.300.0020.00518.77
8.0.290.0030.00617.18
8.0.280.0070.00018.31
8.0.270.0030.00317.31
8.0.260.0000.00616.85
8.0.250.0070.00016.93
8.0.240.0040.00416.97
8.0.230.0030.00316.96
8.0.220.0050.00316.86
8.0.210.0000.00716.86
8.0.200.0060.00016.83
8.0.190.0070.00017.01
8.0.180.0000.00716.89
8.0.170.0040.00416.98
8.0.160.0000.00716.78
8.0.150.0040.00416.83
8.0.140.0060.00316.73
8.0.130.0050.00013.23
8.0.120.0040.00416.75
8.0.110.0050.00316.84
8.0.100.0030.00516.78
8.0.90.0040.00416.77
8.0.80.0030.01716.84
8.0.70.0000.00716.91
8.0.60.0000.00816.84
8.0.50.0070.00016.87
8.0.30.0060.01216.85
8.0.20.0120.00617.40
8.0.10.0070.00417.07
8.0.00.0130.00516.81
7.4.330.0030.00315.00
7.4.320.0030.00316.36
7.4.300.0060.00016.47
7.4.290.0030.00316.58
7.4.280.0030.00316.51
7.4.270.0000.00616.52
7.4.260.0040.00416.57
7.4.250.0000.00716.36
7.4.240.0060.00216.62
7.4.230.0040.00416.34
7.4.220.0150.00616.54
7.4.210.0040.01016.53
7.4.200.0070.00016.40
7.4.190.0000.00716.40
7.4.160.0100.00616.34
7.4.150.0120.00617.40
7.4.140.0100.00817.86
7.4.130.0090.00916.53
7.4.120.0080.00816.43
7.4.110.0130.01016.26
7.4.100.0070.01016.67
7.4.90.0070.01016.65
7.4.80.0080.01119.39
7.4.70.0100.01016.57
7.4.60.0120.00416.66
7.4.50.0020.00216.60
7.4.40.0110.00422.77
7.4.30.0000.01716.35
7.4.00.0050.01014.82
7.3.330.0000.00513.29
7.3.320.0000.00613.29
7.3.310.0030.00316.32
7.3.300.0040.00416.25
7.3.290.0090.01216.31
7.3.280.0090.00816.29
7.3.270.0120.00917.40
7.3.260.0070.01316.56
7.3.250.0080.01016.38
7.3.240.0060.01716.27
7.3.230.0080.00816.54
7.3.210.0080.00816.27
7.3.200.0090.00919.39
7.3.190.0080.00616.61
7.3.180.0060.01016.25
7.3.170.0130.00316.27
7.3.160.0040.01716.49
7.3.120.0030.01414.87
7.3.110.0040.01414.63
7.3.100.0090.00614.38
7.3.90.0030.01014.81
7.3.80.0000.01114.74
7.3.70.0040.00814.48
7.3.60.0070.00714.51
7.3.50.0080.00814.83
7.3.40.0080.00514.52
7.3.30.0100.00714.58
7.3.20.0090.00616.43
7.3.10.0100.00716.40
7.3.00.0030.01316.47
7.2.330.0070.01116.70
7.2.320.0070.01016.45
7.2.310.0130.01016.69
7.2.300.0070.01016.72
7.2.290.0030.01816.75
7.2.250.0070.01115.28
7.2.240.0030.01714.78
7.2.230.0030.01015.21
7.2.220.0080.00815.08
7.2.210.0030.01215.20
7.2.200.0040.00815.18
7.2.190.0110.00414.98
7.2.180.0080.00415.17
7.2.170.0030.00914.96
7.2.00.0170.01119.12
7.1.330.0030.01015.68
7.1.320.0040.01115.67
7.1.310.0160.00015.61
7.1.300.0070.00715.68
7.1.290.0030.00715.50
7.1.280.0090.00615.61
7.1.270.0120.00615.55
7.1.260.0030.01415.74
7.1.100.0000.01217.98
7.1.70.0080.00317.13
7.1.60.0070.01719.40
7.1.50.0070.01316.56
7.1.00.0070.07322.37
7.0.200.0030.00616.72
7.0.140.0100.07022.19
7.0.60.0070.03719.82
7.0.50.0000.08017.86
7.0.40.0070.04720.26
7.0.30.0330.07720.10
7.0.20.0070.05320.32
7.0.10.0130.07020.05
7.0.00.0030.05020.25
5.6.210.0000.05320.57
5.6.200.0030.08718.18
5.6.190.0070.08020.61
5.6.180.0170.09020.77
5.6.170.0170.04320.71
5.6.160.0030.04720.46
5.6.150.0070.05318.17
5.6.140.0100.03318.27
5.6.130.0100.07718.15
5.6.120.0000.04321.04
5.6.110.0030.09020.99
5.6.100.0130.08021.01
5.6.90.0130.06321.08
5.6.80.0070.07720.53
5.5.350.0070.07720.36
5.5.340.0100.05018.05
5.5.330.0100.08020.57
5.5.320.0300.07020.35
5.5.310.0230.08020.27
5.5.300.0030.08318.03
5.5.290.0070.07017.98
5.5.280.0000.09020.74
5.5.270.0200.07020.83
5.5.260.0100.07720.64
5.5.250.0200.08020.69
5.5.240.0300.07320.19
5.4.450.0370.06319.17
5.4.440.0530.06719.46
5.4.430.0630.07319.43
5.4.420.0070.06019.46
5.4.410.0930.04019.06
5.4.400.0070.05719.06
5.4.390.0400.06718.86
5.4.380.0330.04718.61
5.4.370.0230.04718.48
5.4.360.0130.05318.80
5.4.350.0090.03912.02
5.4.340.0070.04112.02
5.4.320.0060.03712.50
5.4.310.0080.04112.50
5.4.300.0100.04112.50
5.4.290.0040.03912.50
5.4.280.0020.03812.40
5.4.270.0050.04212.40
5.4.260.0120.03412.40
5.4.250.0030.05718.76
5.4.240.0100.05318.83
5.4.230.0100.06018.96
5.4.220.0100.05318.94
5.4.210.0170.04319.04
5.4.200.0170.04018.99
5.4.190.0100.05018.93
5.4.180.0130.05018.96
5.4.170.0200.04319.02
5.4.160.0070.05018.99
5.4.150.0030.05718.95
5.4.140.0100.04716.36
5.4.130.0100.04316.63
5.4.120.0070.05316.39
5.4.110.0070.05316.63
5.4.100.0100.05016.40
5.4.90.0000.06016.40
5.4.80.0170.04016.56
5.4.70.0100.04716.45
5.4.60.0100.06016.38
5.4.50.0100.04716.30
5.4.40.0070.05016.52
5.4.30.0000.07016.61
5.4.20.0070.04716.30
5.4.10.0130.04316.45
5.4.00.0030.05015.76
5.3.290.0030.04312.80
5.3.280.0130.04314.50
5.3.270.0030.05314.46
5.3.260.0030.05314.60
5.3.250.0070.05314.38
5.3.240.0100.06014.52
5.3.230.0070.05014.30
5.3.220.0070.05014.44
5.3.210.0070.05314.27
5.3.200.0070.05714.40
5.3.190.0030.06314.68
5.3.180.0200.04314.34
5.3.170.0070.06014.66
5.3.160.0070.05714.56
5.3.150.0130.04314.40
5.3.140.0070.05014.43
5.3.130.0070.05714.70
5.3.120.0070.07014.32
5.3.110.0170.05714.70
5.3.100.0100.04314.05
5.3.90.0030.05313.86
5.3.80.0070.05014.17
5.3.70.0130.05013.91
5.3.60.0000.05714.01
5.3.50.0100.04313.79
5.3.40.0100.06013.83
5.3.30.0130.05713.90
5.3.20.0100.05313.71
5.3.10.0100.06313.59
5.3.00.0170.05713.59
5.2.170.0030.05011.16
5.2.160.0100.03311.04
5.2.150.0170.03711.14
5.2.140.0070.04311.15
5.2.130.0070.03711.21
5.2.120.0030.04011.25
5.2.110.0070.04011.19
5.2.100.0100.03710.86
5.2.90.0070.04011.00
5.2.80.0030.04311.11
5.2.70.0130.05011.01
5.2.60.0130.04710.95
5.2.50.0100.05710.85
5.2.40.0070.04010.98
5.2.30.0000.05710.98
5.2.20.0100.03310.97
5.2.10.0070.03710.70
5.2.00.0070.03710.66
5.1.60.0070.03310.09
5.1.50.0200.0239.88
5.1.40.0030.03710.21
5.1.30.0030.04310.50
5.1.20.0030.04010.52
5.1.10.0000.04010.12
5.1.00.0030.05010.02
5.0.50.0000.0338.63
5.0.40.0130.0178.64
5.0.30.0070.0408.41
5.0.20.0100.0208.23
5.0.10.0030.0378.35
5.0.00.0000.0438.11
4.4.90.0070.0207.39
4.4.80.0030.0237.39
4.4.70.0030.0207.39
4.4.60.0030.0237.39
4.4.50.0070.0177.39
4.4.40.0000.0337.39
4.4.30.0000.0237.39
4.4.20.0030.0237.39
4.4.10.0000.0237.39
4.4.00.0030.0337.39
4.3.110.0030.0237.39
4.3.100.0030.0207.39
4.3.90.0070.0207.39
4.3.80.0070.0377.39
4.3.70.0100.0177.39
4.3.60.0070.0177.39
4.3.50.0000.0237.39
4.3.40.0000.0377.39
4.3.30.0030.0207.39
4.3.20.0030.0207.39
4.3.10.0030.0277.39
4.3.00.0070.0238.10

preferences:
54.35 ms | 400 KiB | 5 Q