3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { private function __clone(){} private function __construct(){} public static function getInstance() { return new static(); } public function cloneIt() { $a = clone $this; return $a; } } class c extends a {} $d = c::getInstance(); $e = $d->cloneIt(); echo "x";

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.60.0130.00316.63
8.3.50.0000.01417.87
8.3.40.0110.00418.56
8.3.30.0040.01118.77
8.3.20.0080.00019.18
8.3.10.0040.00421.76
8.3.00.0080.00020.58
8.2.180.0100.01018.66
8.2.170.0110.01122.96
8.2.160.0090.01218.98
8.2.150.0000.00724.18
8.2.140.0080.00424.66
8.2.130.0030.00617.91
8.2.120.0040.00426.35
8.2.110.0060.00320.24
8.2.100.0090.00317.72
8.2.90.0040.00417.75
8.2.80.0030.00517.97
8.2.70.0050.00317.90
8.2.60.0000.00818.03
8.2.50.0030.00618.10
8.2.40.0000.00719.27
8.2.30.0080.00019.09
8.2.20.0030.00618.00
8.2.10.0040.00418.06
8.2.00.0000.01017.64
8.1.280.0100.00725.92
8.1.270.0040.00418.74
8.1.260.0000.00726.35
8.1.250.0040.00428.09
8.1.240.0040.00423.84
8.1.230.0100.00022.16
8.1.220.0060.00317.74
8.1.210.0050.00318.77
8.1.200.0040.00417.23
8.1.190.0040.00417.25
8.1.180.0000.00818.10
8.1.170.0030.00618.59
8.1.160.0040.00418.89
8.1.150.0080.00018.82
8.1.140.0000.00822.04
8.1.130.0050.00520.07
8.1.120.0070.00017.41
8.1.110.0000.00717.27
8.1.100.0030.00617.39
8.1.90.0000.00817.38
8.1.80.0000.00817.42
8.1.70.0070.00017.41
8.1.60.0060.00317.48
8.1.50.0020.00517.45
8.1.40.0000.00817.42
8.1.30.0040.00417.59
8.1.20.0040.00417.63
8.1.10.0040.00417.44
8.1.00.0000.00917.35
8.0.300.0040.00418.77
8.0.290.0040.00416.75
8.0.280.0030.00318.32
8.0.270.0070.00017.21
8.0.260.0000.00618.45
8.0.250.0030.00316.88
8.0.240.0040.00416.85
8.0.230.0060.00316.94
8.0.220.0080.00016.72
8.0.210.0030.00316.81
8.0.200.0000.00716.73
8.0.190.0080.00016.92
8.0.180.0000.00716.89
8.0.170.0000.00816.89
8.0.160.0070.00016.85
8.0.150.0000.00716.72
8.0.140.0070.00016.68
8.0.130.0000.00613.27
8.0.120.0000.00816.82
8.0.110.0040.00416.85
8.0.100.0080.00016.89
8.0.90.0030.00316.89
8.0.80.0070.00816.85
8.0.70.0040.00416.81
8.0.60.0040.00416.70
8.0.50.0070.00016.72
8.0.30.0110.00717.13
8.0.20.0120.00717.40
8.0.10.0070.00016.84
8.0.00.0130.00516.93
7.4.330.0000.00515.55
7.4.320.0000.00616.46
7.4.300.0020.00516.65
7.4.290.0070.00016.57
7.4.280.0000.01016.63
7.4.270.0000.00716.46
7.4.260.0030.00316.59
7.4.250.0060.00316.61
7.4.240.0030.00316.43
7.4.230.0020.00516.71
7.4.220.0040.00416.63
7.4.210.0070.01016.61
7.4.200.0030.00316.68
7.4.160.0070.00916.57
7.4.140.0100.00817.86
7.4.130.0130.01016.65
7.4.120.0120.00616.58
7.3.330.0060.00013.29
7.3.320.0000.00613.22
7.3.310.0030.00516.16
7.3.300.0030.00316.16
7.3.290.0030.00316.16
7.3.280.0130.00616.23
7.3.260.0100.00816.41
7.3.240.0060.01316.47
7.1.210.0110.00415.36

preferences:
57.53 ms | 401 KiB | 5 Q