3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait MyTrait { private $abc = 1; public static function increment($by) { $this->abc += $by; } public function getValue() { return $this->abc; } } class MyClass { use MyTrait; public function increment() { MyTrait::increment(1); } } $c = new MyClass; $c->increment(); $c->increment(); var_dump($c->getValue());

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.0070.01516.60
8.3.60.0090.00918.68
8.3.50.0080.00817.95
8.3.40.0110.00418.77
8.3.30.0140.00718.84
8.3.20.0050.00220.33
8.3.10.0040.00421.74
8.3.00.0040.00419.25
8.2.180.0160.00618.41
8.2.170.0040.01122.96
8.2.160.0110.00420.44
8.2.150.0150.00325.66
8.2.140.0040.00424.66
8.2.130.0070.00022.08
8.2.120.0050.00226.35
8.2.110.0070.01119.52
8.2.100.0040.00717.84
8.2.90.0050.00319.22
8.2.80.0080.00017.97
8.2.70.0060.00317.48
8.2.60.0040.00417.93
8.2.50.0040.00418.16
8.2.40.0040.00420.21
8.2.30.0050.00219.18
8.2.20.0030.00518.06
8.2.10.0040.00418.11
8.2.00.0000.00718.25
8.1.280.0040.01125.92
8.1.270.0000.00821.98
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0080.00022.65
8.1.230.0040.00717.83
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0030.00617.35
8.1.190.0050.00317.23
8.1.180.0000.00918.10
8.1.170.0050.00318.50
8.1.160.0040.00418.90
8.1.150.0050.00218.80
8.1.140.0040.00417.66
8.1.130.0080.00020.82
8.1.120.0040.00417.47
8.1.110.0040.00417.51
8.1.100.0040.00417.34
8.1.90.0040.00417.34
8.1.80.0030.00817.50
8.1.70.0070.00017.52
8.1.60.0090.00017.53
8.1.50.0040.00417.58
8.1.40.0060.00317.50
8.1.30.0040.00417.61
8.1.20.0070.00017.63
8.1.10.0000.00717.55
8.1.00.0040.00717.40
8.0.300.0000.00718.77
8.0.290.0050.00216.75
8.0.280.0030.00318.41
8.0.270.0070.00017.30
8.0.260.0090.00018.50
8.0.250.0030.00316.91
8.0.240.0070.00016.91
8.0.230.0000.00717.07
8.0.220.0060.00016.91
8.0.210.0000.00716.81
8.0.200.0030.00316.96
8.0.190.0000.00817.00
8.0.180.0000.00817.06
8.0.170.0040.00417.00
8.0.160.0040.00417.01
8.0.150.0040.00416.85
8.0.140.0040.00416.80
8.0.130.0000.00513.35
8.0.120.0040.00416.82
8.0.110.0040.00416.99
8.0.100.0000.00716.85
8.0.90.0040.00416.98
8.0.80.0040.01216.84
8.0.70.0040.00416.76
8.0.60.0000.00816.78
8.0.50.0000.00716.86
8.0.30.0100.01117.27
8.0.20.0090.01017.40
8.0.10.0050.00317.12
8.0.00.0090.00916.80
7.4.330.0000.00515.55
7.4.320.0030.00316.50
7.4.300.0000.00716.62
7.4.290.0000.00716.49
7.4.280.0000.00916.60
7.4.270.0000.00716.61
7.4.260.0000.00716.61
7.4.250.0050.00316.47
7.4.240.0040.00416.52
7.4.230.0000.00716.48
7.4.220.0000.00716.39
7.4.210.0110.00716.46
7.4.200.0000.00716.66
7.4.160.0130.00716.37
7.4.150.0120.00617.40
7.4.140.0110.00617.86
7.4.130.0100.00716.61
7.4.120.0110.00816.57
7.4.110.0070.01016.60
7.4.100.0100.01416.70
7.4.90.0100.00716.79
7.4.80.0160.00619.39
7.4.70.0110.00716.45
7.4.60.0080.00816.40
7.4.50.0060.01216.59
7.4.40.0100.00716.70
7.4.00.0070.01115.20
7.3.330.0030.00213.23
7.3.320.0050.00013.23
7.3.310.0030.00416.38
7.3.300.0000.00716.35
7.3.290.0000.00716.14
7.3.280.0070.01116.37
7.3.270.0110.00717.40
7.3.260.0070.01416.41
7.3.250.0090.01116.44
7.3.240.0090.01016.32
7.3.230.0060.01116.55
7.3.210.0110.00616.50
7.3.200.0100.00616.61
7.3.190.0070.01016.40
7.3.180.0060.01016.59
7.3.170.0060.00916.48
7.3.160.0030.01216.60
7.3.10.0110.00716.17
7.3.00.0040.01316.67
7.2.330.0140.00316.62
7.2.320.0070.01016.54
7.2.310.0110.00616.57
7.2.300.0090.00916.39
7.2.290.0060.01016.68
7.2.130.0070.00716.60
7.2.120.0000.01116.49
7.2.110.0090.00616.56
7.2.100.0000.01716.47
7.2.90.0000.00916.66
7.2.80.0070.00416.63
7.2.70.0000.01216.72
7.2.60.0050.00716.88
7.2.50.0030.01016.81
7.2.40.0070.00316.91
7.2.30.0060.00616.66
7.2.20.0040.00416.46
7.2.10.0180.00717.23
7.2.00.0210.00517.36
7.1.250.0030.00615.54
7.1.200.0070.00415.64
7.1.130.0260.01316.40
7.1.120.0310.00916.70
7.1.110.0260.01015.92
7.1.100.0250.01115.59
7.1.90.0270.01315.70
7.1.80.0320.01316.11
7.1.70.0490.01215.18
7.1.60.0460.01133.13
7.1.50.0490.01032.93
7.1.40.0330.01632.39
7.1.30.0400.01732.55
7.1.20.0430.00632.52
7.1.10.0350.00314.33
7.1.00.0300.01214.68

preferences:
50.73 ms | 401 KiB | 5 Q