3v4l.org

run code in 500+ PHP versions simultaneously
<?php final class Thing { public function __construct(public readonly string $something) {} public function withSomething(string $something): self { $instance = clone $this; $instance->something = $something; return $instance; } } $thing = new Thing('hello'); $thing = $thing->withSomething('goodbye');

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.70.0040.00317.13
8.5.60.0080.01016.83
8.5.50.0100.00816.90
8.5.30.0100.00018.95
8.5.20.0050.00419.58
8.5.10.0120.00820.17
8.5.00.0100.01122.91
8.4.220.0120.00919.84
8.4.210.0100.01119.67
8.4.180.0040.00621.61
8.4.170.0100.01220.49
8.4.160.0120.00923.71
8.4.150.0090.00416.97
8.4.140.0100.01217.68
8.4.130.0130.00717.85
8.4.120.0010.00824.17
8.4.110.0110.01022.64
8.4.100.0120.00918.07
8.4.90.0120.00719.06
8.4.80.0070.00117.87
8.4.70.0120.00818.25
8.4.60.0130.00618.81
8.4.50.0050.00420.44
8.4.40.0180.00317.91
8.4.30.0000.00820.65
8.4.20.0110.00817.82
8.4.10.0040.01522.07
8.3.310.0070.00818.58
8.3.300.0110.00920.94
8.3.290.0140.00820.70
8.3.280.0090.01218.57
8.3.270.0130.00716.68
8.3.260.0110.00916.46
8.3.250.0110.00818.52
8.3.240.0110.00517.10
8.3.230.0100.01016.85
8.3.220.0120.00517.24
8.3.210.0100.00816.61
8.3.200.0060.00516.77
8.3.190.0120.00617.12
8.3.180.0120.00417.34
8.3.170.0130.00320.73
8.3.160.0110.00717.17
8.3.150.0070.00417.05
8.3.140.0050.00318.76
8.3.130.0040.00418.44
8.3.120.0070.00720.74
8.3.110.0150.00416.76
8.3.100.0090.00016.70
8.3.50.0070.01316.88
8.2.310.0100.00818.23
8.2.300.0120.00922.18
8.2.290.0170.00220.50
8.2.280.0090.01018.43
8.2.270.0140.00317.27
8.2.260.0140.00316.68
8.2.250.0000.00816.91
8.2.240.0060.00617.06
8.2.230.0000.00916.44
8.2.220.0000.00916.69
8.1.340.0040.00517.69
8.1.330.0100.00823.96
8.1.320.0110.00816.17
8.1.310.0070.00717.05
8.1.300.0090.00616.62
8.1.90.0000.00717.32
8.1.80.0140.00317.39
8.1.70.0160.00017.39
8.1.60.0150.00517.51
8.1.50.0130.00417.52
8.1.40.0110.00717.52
8.1.30.0090.00917.58
8.1.20.0060.01217.47
8.1.10.0090.00917.44
8.1.00.0140.00417.36
8.0.220.0070.00816.89
8.0.210.0100.00516.72
8.0.200.0110.00516.87
8.0.190.0130.00316.76
8.0.180.0120.00316.75
8.0.170.0160.00016.73
8.0.160.0000.01416.78
8.0.150.0110.00416.81
8.0.140.0140.00016.86
8.0.130.0080.00816.75
8.0.120.0150.00016.78
8.0.110.0080.00816.80
8.0.100.0150.00016.77
8.0.90.0100.00716.66
8.0.80.0090.00616.82
8.0.70.0160.00016.78
8.0.60.0120.00516.84
8.0.50.0090.00616.82
8.0.30.0080.00816.83
8.0.20.0090.00416.79
8.0.10.0130.00016.82
7.4.300.0100.00016.28
7.4.290.0030.01216.46
7.4.280.0140.00016.48
7.4.270.0110.00416.32
7.4.260.0110.00216.27
7.4.250.0100.00516.44
7.4.240.0000.01416.43
7.4.230.0090.00416.32
7.4.220.0000.01216.34
7.4.210.0120.00016.41
7.4.200.0060.00616.32
7.4.190.0040.00416.29
7.4.180.0000.00716.12
7.4.160.0040.00415.95
7.4.150.0040.00416.09
7.4.140.0090.00015.73
7.4.130.0090.00015.92
7.4.120.0100.00016.01
7.4.110.0060.00216.18
7.4.100.0040.00516.36
7.4.90.0040.00416.21
7.4.80.0040.00415.71
7.4.70.0040.00416.15
7.4.60.0040.00416.30
7.4.50.0030.00816.14
7.4.40.0080.00316.12
7.4.30.0110.00016.27
7.4.20.0030.00616.14
7.4.10.0000.00815.93
7.4.00.0040.00416.18

preferences:
52.72 ms | 1019 KiB | 5 Q