3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait MyTrait { protected function a() { var_dump(__METHOD__); } protected function b() { var_dump(__METHOD__); } } class MyClass { use MyTrait { a as protected; } public function __construct() { $this->a(); $this->b(); } } new MyClass();

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.70.0130.00616.75
8.3.60.0100.01018.43
8.3.50.0110.01118.27
8.3.40.0120.00318.40
8.3.30.0100.00718.58
8.3.20.0040.00420.63
8.3.10.0050.00323.53
8.3.00.0060.00323.71
8.2.190.0140.00317.94
8.2.180.0110.00416.38
8.2.170.0160.00622.96
8.2.160.0060.01220.48
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00420.55
8.2.120.0070.00026.35
8.2.110.0070.00320.22
8.2.100.0080.00417.72
8.2.90.0030.00717.50
8.2.80.0040.00417.97
8.2.70.0030.00617.80
8.2.60.0070.00018.09
8.2.50.0000.00818.10
8.2.40.0050.00319.36
8.2.30.0050.00219.13
8.2.20.0000.00817.90
8.2.10.0050.00219.19
8.2.00.0050.00218.05
8.1.280.0090.00925.92
8.1.270.0090.00018.73
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0030.00623.96
8.1.230.0110.00019.14
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0090.00317.23
8.1.190.0040.00417.40
8.1.180.0000.00818.10
8.1.170.0030.00618.66
8.1.160.0040.00418.90
8.1.150.0030.00618.82
8.1.140.0080.00018.87
8.1.130.0030.00320.07
8.1.120.0000.00817.39
8.1.110.0000.00817.42
8.1.100.0060.00317.28
8.1.90.0040.00417.40
8.1.80.0040.00417.38
8.1.70.0090.00017.38
8.1.60.0030.00617.52
8.1.50.0000.01017.35
8.1.40.0030.00617.48
8.1.30.0080.00017.54
8.1.20.0070.00317.59
8.1.10.0030.00517.47
8.1.00.0040.00417.43
8.0.300.0080.00019.55
8.0.290.0030.00616.63
8.0.280.0050.00318.36
8.0.270.0030.00317.20
8.0.260.0040.00418.36
8.0.250.0040.00416.86
8.0.240.0030.00317.00
8.0.230.0000.00716.91
8.0.220.0000.00716.78
8.0.210.0060.00016.79
8.0.200.0030.00316.85
8.0.190.0050.00216.93
8.0.180.0080.00016.82
8.0.170.0060.00316.77
8.0.160.0000.00916.79
8.0.150.0030.00316.66
8.0.140.0040.00416.81
8.0.130.0030.00313.25
8.0.120.0040.00416.70
8.0.110.0040.00416.79
8.0.100.0080.00016.78
8.0.90.0040.00416.72
8.0.80.0070.00916.79
8.0.70.0040.00416.86
8.0.60.0040.00416.87
8.0.50.0030.00516.93
8.0.30.0110.00917.15
8.0.20.0200.00617.43
8.0.10.0040.00416.82
8.0.00.0100.01016.65
7.4.330.0000.00415.55
7.4.320.0000.00716.43
7.4.300.0040.00316.44
7.4.290.0050.00316.53
7.4.280.0040.00416.47
7.4.270.0030.00316.33
7.4.260.0040.00416.54
7.4.250.0000.00716.41
7.4.240.0000.00716.46
7.4.230.0000.00716.43
7.4.220.0070.00016.60
7.4.210.0110.00916.50
7.4.200.0000.00716.59
7.4.160.0080.00716.54
7.4.140.0110.00917.86
7.4.130.0030.01416.44
7.4.120.0080.00816.39
7.4.110.0090.00916.37
7.4.100.0070.01016.52
7.4.90.0070.01016.44
7.4.80.0060.01219.39
7.4.70.0150.00516.33
7.4.60.0120.00916.48
7.4.50.0060.01216.29
7.4.40.0070.01016.18
7.4.00.0090.00614.59
7.3.330.0000.00613.02
7.3.320.0000.00613.21
7.3.310.0070.00016.27
7.3.300.0050.00216.10
7.3.290.0040.00416.11
7.3.280.0090.00616.21
7.3.260.0090.00816.42
7.3.240.0110.00816.46
7.3.230.0120.00416.33
7.3.210.0060.00916.50
7.3.200.0090.00616.38
7.3.190.0120.00816.25
7.3.180.0040.01116.27
7.3.170.0100.00716.38
7.3.160.0110.00916.42
7.3.10.0420.00914.60
7.3.00.0350.00314.77
7.2.330.0100.00716.37
7.2.320.0170.00316.63
7.2.310.0040.01316.73
7.2.300.0070.01016.66
7.2.290.0140.00316.57
7.2.130.0420.00014.98
7.2.120.0640.01014.85
7.2.110.0590.00714.73
7.2.100.0550.00314.83
7.2.90.0320.00615.07
7.2.80.0330.00715.05
7.2.70.0400.00014.74
7.2.60.0370.00314.86
7.2.50.0540.01014.87
7.2.40.0480.00714.89
7.2.30.0390.00314.92
7.2.20.0360.00714.87
7.2.10.0430.01314.78
7.2.00.0660.00715.08
7.1.250.0380.00313.68

preferences:
49.34 ms | 401 KiB | 5 Q