3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Movie { private $one = ''; private $two = ''; private $three = ''; public function one(): self { $this->one = "One "; return $this; // return object } public function two(): self { $this->two = "Flew Over the "; return $this; // return object } public function three(): self { $this->three = "Cuckoo's Nest"; return $this; // return object } public function show(): string { return $this->one . $this->two . $this->three; } } $movie = new Movie(); echo $movie->one()->two()->three()->show();

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.30.0120.00418.96
8.5.20.0080.01121.00
8.5.10.0090.00916.76
8.5.00.0100.01120.03
8.4.180.0140.00819.68
8.4.170.0100.00723.94
8.4.160.0110.01122.06
8.4.150.0080.00416.91
8.4.140.0140.00717.70
8.4.130.0110.00917.85
8.4.120.0090.00920.59
8.4.110.0040.00622.48
8.4.100.0120.00917.69
8.4.90.0050.00417.74
8.4.80.0110.00719.60
8.4.70.0090.01217.82
8.4.60.0070.00218.91
8.4.50.0110.00817.79
8.4.40.0030.01617.61
8.4.30.0290.00718.98
8.4.20.0200.00517.66
8.4.10.0270.00718.42
8.3.300.0130.00720.98
8.3.290.0110.00920.60
8.3.280.0110.00920.82
8.3.270.0170.00616.85
8.3.260.0050.00316.60
8.3.250.0130.00619.00
8.3.240.0170.00516.66
8.3.230.0100.00916.78
8.3.220.0030.00421.02
8.3.210.0100.00916.78
8.3.200.0050.00316.84
8.3.190.0080.01117.28
8.3.180.0110.00418.66
8.3.170.0120.00618.94
8.3.160.0190.01416.48
8.3.150.0240.00218.51
8.3.140.0220.00816.67
8.3.130.0170.00817.60
8.3.120.0230.00617.75
8.3.110.0210.00618.64
8.3.100.0230.00320.30
8.3.90.0230.00621.64
8.3.80.0130.00616.67
8.3.70.0180.00616.58
8.3.60.0140.00516.56
8.3.50.0200.00517.47
8.3.40.0270.00019.70
8.3.30.0230.00318.02
8.3.20.0200.00420.79
8.3.10.0200.00420.97
8.3.00.0090.00721.74
8.2.300.0130.00820.51
8.2.290.0030.00618.65
8.2.280.0050.00418.25
8.2.270.0180.00616.94
8.2.260.0190.00718.58
8.2.250.0150.01216.46
8.2.240.0200.00716.62
8.2.230.0140.00319.55
8.2.220.0180.00326.79
8.2.210.0230.00521.49
8.2.200.0180.00716.52
8.2.190.0220.00516.67
8.2.180.0220.00721.26
8.2.170.0240.00618.32
8.2.160.0190.01020.27
8.2.150.0210.00521.55
8.2.140.0190.01020.93
8.2.130.0200.00621.81
8.2.120.0160.00419.34
8.2.110.0100.00419.18
8.2.100.0140.00317.49
8.2.90.0100.00417.56
8.2.80.0130.00218.48
8.2.70.0130.00317.37
8.2.60.0170.00417.29
8.2.50.0110.00417.38
8.2.40.0090.00417.69
8.2.30.0100.00517.42
8.2.20.0080.00518.96
8.2.10.0100.00417.46
8.2.00.0070.00618.30
8.1.340.0120.01021.88
8.1.330.0100.00822.09
8.1.320.0090.00816.16
8.1.310.0120.00117.30
8.1.300.0080.00616.79
8.1.290.0110.00317.39
8.1.280.0110.00720.96
8.1.270.0120.00220.61
8.1.260.0110.00221.78
8.1.250.0130.00022.54
8.1.240.0070.00619.83
8.1.230.0110.00419.61
8.1.220.0080.00617.33
8.1.210.0070.00617.97
8.1.200.0090.00317.26
8.1.190.0090.00517.02
8.1.180.0110.00117.61
8.1.170.0070.00618.08
8.1.160.0110.00117.94
8.1.150.0100.00217.83
8.1.140.0110.00217.31
8.1.130.0100.00518.58
8.1.120.0070.00517.31
8.1.110.0070.00517.38
8.1.100.0090.00417.19
8.1.90.0130.00217.17
8.1.80.0100.00417.35
8.1.70.0160.00217.43
8.1.60.0090.00517.36
8.1.50.0160.00517.31
8.1.40.0100.00917.32
8.1.30.0100.00317.46
8.1.20.0130.00117.36
8.1.10.0140.00117.30
8.1.00.0130.00317.42
8.0.300.0110.00318.17
8.0.290.0110.00316.54
8.0.280.0100.00217.33
8.0.270.0100.00216.64
8.0.260.0080.00317.39
8.0.250.0070.00616.62
8.0.240.0120.00216.63
8.0.230.0050.00716.66
8.0.220.0070.00516.55
8.0.210.0110.00216.57
8.0.200.0110.00316.65
8.0.190.0090.00516.70
8.0.180.0090.00516.68
8.0.170.0040.00816.84
8.0.160.0090.00416.71
8.0.150.0100.00316.64
8.0.140.0060.00816.67
8.0.130.0070.00916.61
8.0.120.0150.00416.62
8.0.110.0180.00416.58
8.0.100.0150.00416.71
8.0.90.0140.00616.55
8.0.80.0150.00316.74
8.0.70.0150.00716.38
8.0.60.0120.00516.61
8.0.50.0130.00416.52
8.0.30.0150.00216.54
8.0.20.0140.00516.62
8.0.10.0120.01116.86
8.0.00.0130.00216.80
7.4.330.0110.00615.82
7.4.320.0120.00516.34
7.4.300.0100.00616.37
7.4.290.0100.00516.20
7.4.280.0100.00716.34
7.4.270.0150.00716.32
7.4.260.0060.01016.46
7.4.250.0120.00916.39
7.4.240.0150.00516.41
7.4.230.0140.00616.38
7.4.220.0170.00216.40
7.4.210.0160.01116.40
7.4.200.0190.00616.38
7.4.190.0220.00816.46
7.4.180.0200.00216.42
7.4.160.0110.00616.36
7.4.150.0110.00716.16
7.4.140.0120.01016.19
7.4.130.0160.00716.11
7.4.120.0170.00216.24
7.4.110.0100.00516.22
7.4.100.0140.00616.33
7.4.90.0180.00716.27
7.4.80.0190.00716.30
7.4.70.0210.00416.35
7.4.60.0200.00416.30
7.4.50.0170.00816.24
7.4.40.0230.00316.11
7.4.30.0200.00616.30
7.4.20.0170.00716.38
7.4.10.0190.00416.15
7.4.00.0230.00216.22
7.3.330.0240.00316.16
7.3.320.0150.00516.02
7.3.310.0160.00516.08
7.3.300.0240.00316.13
7.3.290.0200.00916.25
7.3.280.0200.00616.20
7.3.270.0250.00116.12
7.3.260.0200.00616.12
7.3.250.0200.00716.05
7.3.240.0190.00816.08
7.3.230.0190.00416.02
7.3.220.0180.00415.99
7.3.210.0190.00716.06
7.3.200.0220.00415.95
7.3.190.0130.01316.11
7.3.180.0150.01016.06
7.3.170.0220.00316.01
7.3.160.0190.00516.11
7.3.150.0180.00916.04
7.3.140.0170.01015.94
7.3.130.0200.00216.03

preferences:
44.75 ms | 1336 KiB | 5 Q