3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait T { protected int $x; } class A { use T; } class B { use T; public function writeToA(A $a): void { $a->x = 1; } } (new B)->writeToA(new A);

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.120.0100.01022.34
8.4.110.0120.00819.01
8.4.100.0160.00517.96
8.4.90.0130.00820.48
8.4.80.0120.00619.18
8.4.70.0110.00919.05
8.4.60.0150.00620.50
8.4.50.0100.01219.10
8.4.40.0080.01117.80
8.4.30.0090.00024.14
8.4.20.0040.00419.70
8.4.10.0110.00819.34
8.3.250.0120.00618.82
8.3.240.0110.00916.53
8.3.230.0120.00716.95
8.3.220.0150.00418.84
8.3.210.0110.00818.73
8.3.200.0040.00516.86
8.3.190.0120.00717.15
8.3.180.0120.00619.01
8.3.170.0030.01717.34
8.3.160.0100.00318.69
8.3.150.0070.01317.16
8.3.140.0030.00516.83
8.3.130.0050.00316.57
8.3.120.0390.00616.51
8.3.110.0400.01116.70
8.3.100.0450.00416.35
8.3.90.0420.00716.61
8.3.80.0350.00316.48
8.3.70.0280.00416.36
8.3.60.0350.00316.59
8.3.50.0240.00316.66
8.3.40.0300.00617.59
8.3.30.0250.00717.52
8.3.20.0140.00917.57
8.3.10.0300.00017.23
8.3.00.0150.00017.50
8.2.290.0090.00917.27
8.2.280.0090.00718.29
8.2.270.0080.00016.65
8.2.260.0110.00717.11
8.2.250.0060.00316.73
8.2.240.0080.01116.45
8.2.230.0160.00316.43
8.2.220.0180.00016.62
8.2.210.0130.00416.55
8.2.200.0090.00916.48
8.2.190.0110.00716.61
8.2.180.0160.00316.43
8.2.170.0150.00917.59
8.2.160.0260.00617.59
8.2.150.0340.00717.52
8.2.140.0390.00017.48
8.2.130.0340.00317.46
8.2.120.0360.00717.32
8.2.110.0410.00417.39
8.2.100.0270.01017.69
8.2.90.0360.00317.64
8.2.80.0400.00417.57
8.2.70.0360.00317.32
8.2.60.0400.00317.27
8.2.50.0290.00917.64
8.2.40.0100.01017.57
8.2.30.0090.00917.59
8.2.20.0170.00017.35
8.2.10.0120.00617.63
8.2.00.0130.00417.68
8.1.330.0110.00916.08
8.1.320.0110.00518.05
8.1.310.0070.01018.49
8.1.300.0080.01116.14
8.1.290.0120.00616.30
8.1.280.0110.00816.18
8.1.270.0190.00317.15
8.1.260.0220.00417.13
8.1.250.0170.00317.23
8.1.240.0120.00617.27
8.1.230.0110.00717.23
8.1.220.0140.00417.32
8.1.210.0250.00416.96
8.1.200.0310.00316.96
8.1.190.0070.01016.88
8.1.180.0180.00017.07
8.1.170.0170.00017.36
8.1.160.0080.00817.29
8.1.150.0110.00617.07
8.1.140.0170.01717.21
8.1.130.0280.00717.06
8.1.120.0180.00417.12
8.1.110.0080.01217.07
8.1.100.0150.00317.37
8.1.90.0140.00717.37
8.1.80.0160.00816.91
8.1.70.0200.01517.20
8.1.60.0390.00717.20
8.1.50.0300.00417.08
8.1.40.0210.01717.27
8.1.30.0240.01217.46
8.1.20.0220.01117.31
8.1.10.0250.00817.30
8.1.00.0370.00717.09

preferences:
25.39 ms | 403 KiB | 5 Q