3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait MyCustomProperty { private string $myString; private int $myInt; private array $myArray; } class MyClass { use MyCustomProperty; function __construct() { $this->myInt = 1; } public function getMyInt(): int { return $this->myInt; } } echo (new MyClass())->getMyInt();

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.5.10.0080.00919.91
8.5.00.0100.01120.00
8.4.150.0020.00014.05
8.4.140.0140.01117.40
8.4.130.0120.01017.61
8.4.120.0140.00624.19
8.4.110.0120.00822.59
8.4.100.0130.00717.86
8.4.90.0120.00818.70
8.4.80.0130.00818.12
8.4.70.0090.01018.05
8.4.60.0160.00618.56
8.4.50.0090.00217.57
8.4.40.0100.01017.93
8.4.30.0040.01120.44
8.4.20.0100.01018.83
8.4.10.0180.00424.09
8.3.280.0100.00820.21
8.3.270.0090.01216.44
8.3.260.0120.00716.73
8.3.250.0120.00619.08
8.3.240.0090.00916.65
8.3.230.0130.00716.68
8.3.220.0090.01117.25
8.3.210.0090.00918.49
8.3.200.0060.00316.65
8.3.190.0070.01019.13
8.3.180.0120.00718.09
8.3.170.0110.00719.00
8.3.160.0080.00016.52
8.3.150.0110.00719.14
8.3.140.0060.00317.08
8.3.130.0090.00618.43
8.3.120.0090.00018.82
8.3.110.0100.01020.94
8.3.100.0090.00024.06
8.3.90.0110.00426.77
8.3.80.0030.00616.75
8.3.70.0090.00616.61
8.3.60.0100.00718.43
8.3.50.0120.00320.03
8.3.40.0040.01120.04
8.3.30.0040.01118.89
8.3.20.0040.00424.18
8.3.10.0080.00024.66
8.3.00.0030.00526.16
8.2.290.0110.00820.38
8.2.280.0110.00820.13
8.2.270.0140.00416.88
8.2.260.0090.00919.17
8.2.250.0060.01218.66
8.2.240.0000.00918.78
8.2.230.0140.00722.58
8.2.220.0080.00037.54
8.2.210.0000.00826.77
8.2.200.0090.00018.66
8.2.190.0030.01418.16
8.2.180.0090.00625.92
8.2.170.0090.00622.96
8.2.160.0060.01322.96
8.2.150.0080.00025.66
8.2.140.0080.00024.66
8.2.130.0000.00726.16
8.2.120.0150.00619.36
8.2.110.0070.00322.10
8.2.100.0080.00417.91
8.2.90.0040.00419.33
8.2.80.0080.00018.77
8.2.70.0040.00417.61
8.2.60.0000.00818.04
8.2.50.0060.00318.07
8.2.40.0050.00218.28
8.2.30.0000.00718.13
8.2.20.0000.00720.53
8.2.10.0040.00418.36
8.2.00.0040.00419.25
8.1.330.0120.00521.94
8.1.320.0080.00716.12
8.1.310.0120.00316.77
8.1.300.0060.01219.65
8.1.290.0090.00018.88
8.1.280.0090.00625.92
8.1.270.0050.00224.66
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0080.00023.83
8.1.230.0090.00319.15
8.1.220.0070.00017.74
8.1.210.0040.00418.77
8.1.200.0040.00417.23
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0040.00418.55
8.1.160.0000.00818.89
8.1.150.0000.00718.64
8.1.140.0040.00417.41
8.1.130.0000.01117.35
8.1.120.0060.00317.51
8.1.110.0030.00917.36
8.1.100.0130.00017.36
8.1.90.0110.00617.29
8.1.80.0090.00517.22
8.1.70.0110.00317.28
8.1.60.0070.00717.49
8.1.50.0110.00317.16
8.1.40.0150.00217.23
8.1.30.0080.00617.01
8.1.20.0070.01017.60
8.1.10.0110.00717.40
8.1.00.0100.00317.20
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0080.00018.45
8.0.270.0070.00016.82
8.0.260.0070.00716.95
8.0.250.0060.00616.95
8.0.240.0090.00416.95
8.0.230.0080.00416.95
8.0.220.0110.00316.95
8.0.210.0140.00016.95
8.0.200.0100.00316.95
8.0.190.0130.00016.95
8.0.180.0080.00416.95
8.0.170.0080.00516.95
8.0.160.0030.01016.95
8.0.150.0090.00316.95
8.0.140.0100.00216.95
8.0.130.0100.00316.95
8.0.120.0090.00416.95
8.0.110.0080.00516.95
8.0.100.0080.00416.95
8.0.90.0060.00616.95
8.0.80.0040.00816.95
8.0.70.0090.00516.95
8.0.60.0040.00916.95
8.0.50.0090.00316.95
8.0.30.0060.00716.95
8.0.20.0110.00316.95
8.0.10.0150.00016.95

preferences:
117.25 ms | 403 KiB | 5 Q