3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait Foo { private $traitProperty = 'blah'; public function getTraitProperty() { return $this->traitProperty; } public function getClassPropertyFromTrait() { return $this->classProperty; } } class MyClass { use Foo; private $classProperty = 'meh'; public function getTraitPropertyFromClass() { return $this->traitProperty; } public function getClassProperty() { return $this->classProperty; } } $x = new MyClass(); var_dump($x->getTraitProperty()); var_dump($x->getTraitPropertyFromClass()); var_dump($x->getClassProperty()); var_dump($x->getClassPropertyFromTrait());

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.4.20.0120.00317.50
8.4.10.0080.00017.54
8.3.150.0130.00616.45
8.3.140.0130.00416.61
8.3.130.0080.00016.71
8.3.120.0130.00318.82
8.3.110.0030.00716.66
8.3.100.0060.00916.79
8.3.90.0030.00526.77
8.3.80.0030.00617.97
8.3.70.0070.00718.13
8.3.60.0120.00316.63
8.3.50.0200.00821.18
8.3.40.0140.00718.67
8.3.30.0070.01418.89
8.3.20.0040.00420.25
8.3.10.0070.00021.85
8.3.00.0030.00517.50
8.2.260.0090.00017.17
8.2.250.0040.00417.38
8.2.240.0090.00917.04
8.2.230.0150.00020.94
8.2.220.0050.00537.54
8.2.210.0110.00726.77
8.2.200.0090.00016.38
8.2.190.0210.00316.58
8.2.180.0110.00718.41
8.2.170.0110.00318.97
8.2.160.0030.01122.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0080.00019.77
8.2.110.0060.00321.03
8.2.100.0060.00617.79
8.2.90.0040.00419.30
8.2.80.0060.00317.97
8.2.70.0000.00817.50
8.2.60.0030.00617.63
8.2.50.0000.00917.55
8.2.40.0060.00319.47
8.2.30.0000.00818.13
8.2.20.0030.00617.69
8.2.10.0000.00718.13
8.2.00.0040.00418.15
8.1.310.0080.00016.88
8.1.300.0100.00716.31
8.1.290.0060.00330.84
8.1.280.0130.00625.92
8.1.270.0070.00024.66
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00322.54
8.1.230.0040.00721.01
8.1.220.0040.00417.78
8.1.210.0030.00618.77
8.1.200.0050.00317.53
8.1.190.0040.00417.22
8.1.180.0030.00618.10
8.1.170.0080.00017.62
8.1.160.0050.00218.83
8.1.150.0040.00418.77
8.1.140.0000.00817.49
8.1.130.0000.00717.89
8.1.120.0030.00317.36
8.1.110.0000.00717.39
8.1.100.0000.00717.49
8.1.90.0040.00417.35
8.1.80.0040.00417.47
8.1.70.0000.00717.45
8.1.60.0060.00317.49
8.1.50.0040.00417.48
8.1.40.0080.00517.49
8.1.30.0130.00417.63
8.1.20.0080.00617.59
8.1.10.0060.00317.48
8.1.00.0100.00217.37
8.0.300.0000.00820.16
8.0.290.0000.00716.75
8.0.280.0000.00718.43
8.0.270.0070.00016.75
8.0.260.0030.00318.51
8.0.250.0040.00416.85
8.0.240.0050.00316.93
8.0.230.0030.00316.90
8.0.220.0040.00416.86
8.0.210.0000.00716.80
8.0.200.0060.00016.97
8.0.190.0050.00316.86
8.0.180.0060.00316.98
8.0.170.0040.00616.86
8.0.160.0060.00916.90
8.0.150.0100.00616.76
8.0.140.0120.00316.84
8.0.130.0100.00515.08
8.0.120.0080.00416.80
8.0.110.0090.00216.84
8.0.100.0040.00716.83
8.0.90.0060.00516.88
8.0.80.0060.00916.76
8.0.70.0080.00516.89
8.0.60.0060.00616.67
8.0.50.0070.00716.63
8.0.30.0100.01316.91
8.0.20.0090.00917.09
8.0.10.0090.00416.73
8.0.00.0090.00716.89
7.4.330.0020.00215.03
7.4.320.0000.00616.60
7.4.300.0070.00016.40
7.4.290.0040.00416.51
7.4.280.0030.00616.49
7.4.270.0080.00016.49
7.4.260.0030.00516.45
7.4.250.0020.00616.35
7.4.240.0010.00616.43
7.4.230.0030.00516.50
7.4.220.0050.00716.49
7.4.210.0030.01016.26
7.4.200.0050.00516.63
7.4.190.0100.00316.17
7.4.180.0060.00616.02
7.4.160.0080.00416.43
7.4.150.0120.00416.80
7.4.140.0120.00817.31
7.4.130.0120.00716.49
7.4.120.0100.00816.38
7.4.110.0080.01016.44
7.4.100.0060.01016.34
7.4.90.0090.00516.40
7.4.80.0130.00617.86
7.4.70.0120.00316.39
7.4.60.0140.00516.11
7.4.50.0070.00516.46
7.4.40.0080.01116.03
7.4.30.0090.00916.35
7.4.20.0110.00716.25
7.4.10.0070.00615.93
7.4.00.0070.00815.31
7.3.330.0100.00614.66
7.3.320.0080.00614.73
7.3.310.0060.00716.24
7.3.300.0090.00616.21
7.3.290.0080.00816.27
7.3.280.0120.00716.26
7.3.270.0110.00916.72
7.3.260.0130.00616.28
7.3.250.0150.00816.32
7.3.240.0160.00316.34
7.3.230.0090.01316.23
7.3.220.0210.00616.26
7.3.210.0090.01116.11
7.3.200.0120.00716.21
7.3.190.0130.00616.29
7.3.180.0150.00516.38
7.3.170.0150.00616.18
7.3.160.0120.00716.21
7.3.150.0160.00816.21
7.3.140.0200.00016.27
7.3.130.0170.00416.24
7.3.120.0100.00915.49
7.3.110.0090.01015.24
7.3.100.0120.00715.25
7.3.90.0110.00615.40
7.3.80.0130.00715.21
7.3.70.0120.00515.25
7.3.60.0110.00515.26
7.3.50.0080.00815.13
7.3.40.0070.00815.30
7.3.30.0110.00615.34
7.3.20.0550.00716.00
7.3.10.0350.00716.10
7.3.00.0430.00616.16
7.2.340.0180.00016.16
7.2.330.0180.01916.41
7.2.320.0120.01016.54
7.2.310.0110.00616.53
7.2.300.0100.00816.48
7.2.290.0160.00316.30
7.2.280.0190.00016.32
7.2.270.0150.00316.30
7.2.260.0140.00516.32
7.2.250.0090.01015.70
7.2.240.0110.00915.67
7.2.230.0100.00715.83
7.2.220.0080.01115.56
7.2.210.0110.00715.36
7.2.200.0120.00715.34
7.2.190.0100.00715.38
7.2.180.0100.00515.59
7.2.170.0090.00815.48
7.2.160.0080.00915.40
7.2.150.0500.00916.31
7.2.140.0540.00716.16
7.2.130.0370.00716.41
7.2.120.0350.00716.41
7.2.110.0290.00816.41
7.2.100.0430.00916.20
7.2.90.0110.00616.41
7.2.80.0200.00716.44
7.2.70.0280.00616.43
7.2.60.0260.00616.38
7.2.50.0250.00816.52
7.2.40.0260.00816.56
7.2.30.0270.00716.52
7.2.20.0220.00816.52
7.2.10.0230.00916.51
7.2.00.0190.00616.86
7.1.330.0110.00716.58
7.1.320.0110.00715.52
7.1.310.0110.00515.66
7.1.300.0070.01015.56
7.1.290.0110.00515.62
7.1.280.0090.00615.65
7.1.270.0120.00315.55
7.1.260.0090.00715.65
7.1.250.0400.00715.20
7.1.240.0550.00915.20
7.1.230.0360.00815.06
7.1.220.0410.00515.15
7.1.210.0460.00714.79
7.1.200.0090.00815.28
7.1.190.0230.00715.11
7.1.180.0290.00915.07
7.1.170.0100.00815.11
7.1.160.0180.00715.17
7.1.150.0270.01115.16
7.1.140.0250.00715.16
7.1.130.0240.00615.16
7.1.120.0280.00615.19
7.1.110.0310.00715.14
7.1.100.0220.00615.69
7.1.90.0280.00415.22
7.1.80.0190.00815.27
7.1.70.0160.00815.45
7.1.60.0210.00815.65
7.1.50.0210.00915.19
7.1.40.0190.00614.81
7.1.30.0190.00814.76
7.1.20.0210.00614.75
7.1.10.0180.00514.79
7.1.00.0190.01916.08
7.0.330.0650.00214.48
7.0.320.0600.00714.38
7.0.310.0570.00514.81
7.0.300.0400.00914.75
7.0.290.0250.00514.69
7.0.280.0350.00514.68
7.0.270.0500.00814.66
7.0.260.0360.00314.70
7.0.250.0320.00714.76
7.0.240.0320.01214.77
7.0.230.0460.00814.28
7.0.220.0330.00614.73
7.0.210.0380.00514.29
7.0.200.0340.00414.29
7.0.190.0430.00514.38
7.0.180.0210.00414.41
7.0.170.0900.00914.37
7.0.160.0300.00714.37
7.0.150.0280.00514.41
7.0.140.0320.00314.29
7.0.130.0340.00614.35
7.0.120.0340.00614.37
7.0.110.0280.00714.25
7.0.100.0300.00914.36
7.0.90.0300.00914.23
7.0.80.0270.00814.26
7.0.70.0300.00414.28
7.0.60.0240.01415.75
7.0.50.0260.01215.00
7.0.40.0710.01415.09
7.0.30.0260.01715.00
7.0.20.0170.02515.08
7.0.10.0170.02315.12
7.0.00.0210.02315.00
5.6.400.0130.00415.05
5.6.390.0090.00914.89
5.6.380.0110.00614.50
5.6.370.0170.00414.58
5.6.360.0180.00614.66
5.6.350.0110.00914.65
5.6.340.0160.00714.71
5.6.330.0130.01114.69
5.6.320.0110.01214.66
5.6.310.0170.00414.70
5.6.300.0140.01114.58
5.6.290.0100.01214.69
5.6.280.0130.01916.06
5.6.270.0150.00814.68
5.6.260.0150.00714.67
5.6.250.0090.01414.68
5.6.240.0120.00914.73
5.6.230.0110.00714.78
5.6.220.0130.00714.48
5.6.210.0140.01515.85
5.6.200.0150.01715.33
5.6.190.0120.01615.42
5.6.180.0120.01415.43
5.6.170.0160.01115.45
5.6.160.0100.02215.32
5.6.150.0130.02315.34
5.6.140.0150.00915.34
5.6.130.0140.01115.37
5.6.120.0120.02115.28
5.6.110.0100.01515.36
5.6.100.0100.01815.32
5.6.90.0120.02215.33
5.6.80.0100.01615.23
5.6.70.0140.02015.11
5.6.60.0150.02015.18
5.6.50.0120.02315.13
5.6.40.0100.01615.13
5.6.30.0110.02015.12
5.6.20.0100.02315.11
5.6.10.0120.01715.13
5.6.00.0160.01315.12
5.5.380.0150.00413.09
5.5.370.0080.00813.05
5.5.360.0130.00613.17
5.5.350.0960.01214.42
5.5.340.0110.01314.07
5.5.330.0100.01414.03
5.5.320.0140.01414.11
5.5.310.0100.02314.16
5.5.300.0110.01214.02
5.5.290.0080.01513.95
5.5.280.0110.02014.00
5.5.270.0080.02614.04
5.5.260.0140.01914.06
5.5.250.0110.01913.91
5.5.240.0120.01913.81
5.5.230.0100.02213.89
5.5.220.0150.01813.83
5.5.210.0120.01913.91
5.5.200.0090.01713.84
5.5.190.0130.01313.71
5.5.180.0140.01913.89
5.5.170.0150.00413.82
5.5.160.0120.01713.91
5.5.150.0080.02113.77
5.5.140.0100.02013.86
5.5.130.0100.02313.88
5.5.120.0070.01913.87
5.5.110.0100.01413.85
5.5.100.0110.01913.89
5.5.90.0130.01513.85
5.5.80.0120.01713.93
5.5.70.0110.01513.83
5.5.60.0100.02013.75
5.5.50.0100.02013.75
5.5.40.0140.01413.80
5.5.30.0080.02113.81
5.5.20.0120.01213.80
5.5.10.0110.02113.82
5.5.00.0080.02213.90
5.4.450.0100.01313.41
5.4.440.0080.02013.31
5.4.430.0130.01813.34
5.4.420.0110.02013.32
5.4.410.0110.01313.36
5.4.400.0090.02113.22
5.4.390.0150.01513.21
5.4.380.0090.02013.21
5.4.370.0120.01113.12
5.4.360.0090.02013.18
5.4.350.0120.01813.11
5.4.340.0080.02213.14
5.4.330.0070.01011.68
5.4.320.0090.01613.17
5.4.310.0110.01913.33
5.4.300.0120.01113.28
5.4.290.0110.01813.10
5.4.280.0100.01813.14
5.4.270.0080.02313.16
5.4.260.0130.01313.17
5.4.250.0080.01213.25
5.4.240.0080.02013.15
5.4.230.0090.01713.13
5.4.220.0090.01513.15
5.4.210.0080.02013.08
5.4.200.0090.01813.15
5.4.190.0100.01913.22
5.4.180.0090.01713.04
5.4.170.0100.01313.11
5.4.160.0100.01713.08
5.4.150.0080.01913.16
5.4.140.0060.01612.51
5.4.130.0110.02212.71
5.4.120.0090.02112.66
5.4.110.0120.01812.69
5.4.100.0090.01912.57
5.4.90.0090.01112.68
5.4.80.0080.01912.71
5.4.70.0110.01112.73
5.4.60.0090.01712.75
5.4.50.0110.00912.70
5.4.40.0120.01712.67
5.4.30.0120.01512.65
5.4.20.0100.01012.71
5.4.10.0100.01612.67
5.4.00.0110.01712.54

preferences:
88.7 ms | 403 KiB | 5 Q