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 doSomething() { return $this; } public function cloneIt() { $a = clone $this; print_r($a); return $a; } } class c extends a { } // private constructor $d = c::getInstance(); // private clone $e = $d->cloneIt();

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.0190.00318.43
8.3.50.0090.01216.65
8.3.40.0090.00618.65
8.3.30.0140.00018.54
8.3.20.0040.00418.99
8.3.10.0080.00021.93
8.3.00.0060.00320.83
8.2.180.0140.00318.31
8.2.170.0100.00722.96
8.2.160.0100.00320.43
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0000.00819.23
8.2.110.0070.00320.58
8.2.100.0110.00317.66
8.2.90.0000.00819.05
8.2.80.0070.00417.97
8.2.70.0030.00617.50
8.2.60.0040.00417.80
8.2.50.0030.00618.10
8.2.40.0000.00820.59
8.2.30.0000.00720.91
8.2.20.0100.00017.87
8.2.10.0070.00018.00
8.2.00.0040.00418.03
8.1.280.0040.01125.92
8.1.270.0040.00422.13
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0150.00322.62
8.1.230.0060.00619.01
8.1.220.0030.00617.74
8.1.210.0080.00018.77
8.1.200.0030.00617.22
8.1.190.0060.00317.24
8.1.180.0040.00418.10
8.1.170.0080.00318.28
8.1.160.0040.00418.89
8.1.150.0040.00418.88
8.1.140.0030.00519.43
8.1.130.0040.00418.83
8.1.120.0040.00417.42
8.1.110.0060.00317.46
8.1.100.0040.00417.25
8.1.90.0040.00417.33
8.1.80.0000.00717.35
8.1.70.0000.00717.37
8.1.60.0070.00417.60
8.1.50.0000.00717.51
8.1.40.0000.01117.51
8.1.30.0050.00317.66
8.1.20.0070.00317.64
8.1.10.0040.00417.52
8.1.00.0080.00017.46
8.0.300.0040.00418.77
8.0.290.0050.00316.63
8.0.280.0050.00218.47
8.0.270.0000.00717.26
8.0.260.0070.00016.68
8.0.250.0070.00016.80
8.0.240.0000.00916.89
8.0.230.0000.00716.79
8.0.220.0050.00216.84
8.0.210.0050.00316.73
8.0.200.0030.00316.75
8.0.190.0080.00016.94
8.0.180.0060.00616.86
8.0.170.0000.00716.75
8.0.160.0050.00216.84
8.0.150.0050.00316.71
8.0.140.0040.00416.83
8.0.130.0000.00513.27
8.0.120.0070.00016.65
8.0.110.0080.00016.86
8.0.100.0040.00416.70
8.0.90.0000.00816.63
8.0.80.0060.01316.77
8.0.70.0050.00316.68
8.0.60.0000.00816.73
8.0.50.0050.00216.87
8.0.30.0080.01117.10
8.0.20.0100.00917.40
8.0.10.0030.00316.92
8.0.00.0210.00016.93
7.4.330.0060.00015.55
7.4.320.0030.00316.46
7.4.300.0070.00016.53
7.4.290.0000.01016.46
7.4.280.0040.00416.58
7.4.270.0070.00016.53
7.4.260.0000.00513.27
7.4.250.0000.00816.45
7.4.240.0040.00416.60
7.4.230.0040.00416.49
7.4.220.0080.00916.50
7.4.210.0080.00916.56
7.4.200.0000.00816.61
7.4.160.0100.00516.42
7.4.150.0220.00417.40
7.4.140.0130.00817.86
7.4.130.0120.01216.55
7.4.120.0120.00816.60
7.4.110.0120.00416.58
7.4.100.0070.01416.47
7.4.90.0090.01516.48
7.4.80.0130.00919.39
7.4.70.0080.00916.54
7.4.60.0040.01216.41
7.4.50.0030.01016.53
7.4.40.0100.00616.68
7.4.30.0190.00316.72
7.4.00.0080.00814.94
7.3.330.0040.00413.32
7.3.320.0000.00613.07
7.3.310.0000.00716.40
7.3.300.0060.00016.35
7.3.290.0030.00316.29
7.3.280.0090.00716.27
7.3.270.0170.00017.40
7.3.260.0170.00616.30
7.3.250.0090.00916.40
7.3.240.0030.01316.39
7.3.230.0060.01516.21
7.3.210.0030.01316.29
7.3.200.0100.00616.58
7.3.190.0060.01016.30
7.3.180.0060.01016.58
7.3.170.0070.01016.25
7.3.160.0110.00516.39
7.3.10.0000.01316.64
7.3.00.0090.00916.42
7.2.330.0030.01316.31
7.2.320.0130.00316.35
7.2.310.0100.00716.71
7.2.300.0060.01016.63
7.2.290.0060.01216.22
7.2.130.0060.01116.84
7.2.120.0060.00916.64
7.2.110.0090.00616.80
7.2.100.0100.00717.00
7.2.90.0060.00916.74
7.2.80.0060.00916.52
7.2.70.0060.00616.64
7.2.60.0090.00516.85
7.2.50.0030.00716.97
7.2.40.0070.01016.89
7.2.30.0090.00016.96
7.2.20.0060.00916.82
7.2.10.0070.00716.90
7.2.00.0030.01016.82
7.1.250.0060.00315.75
7.1.240.0000.01015.69
7.1.230.0000.01015.50
7.1.220.0140.00015.75
7.1.210.0060.00315.45
7.1.200.0020.01115.60
7.1.190.0090.00315.69
7.1.180.0070.00715.74
7.1.170.0090.00315.88
7.1.160.0040.01115.61
7.1.150.0030.00715.55
7.1.140.0060.00315.95
7.1.130.0070.00715.70
7.1.120.0000.01415.68
7.1.110.0060.00915.80
7.1.100.0030.00816.89
7.1.90.0000.01415.50
7.1.80.0000.01515.66
7.1.70.0070.00516.39
7.1.60.0100.00924.55
7.1.50.0070.01224.23
7.1.40.0590.01124.04
7.1.30.0630.00824.12
7.1.20.0620.00924.03
7.1.10.0020.00815.13
7.1.00.0050.00815.21
7.0.330.0100.00315.44
7.0.320.0040.00715.18
7.0.310.0030.01015.40
7.0.300.0030.00715.35
7.0.290.0060.01015.56
7.0.280.0070.00715.50
7.0.270.0030.00615.21
7.0.260.0000.00815.36
7.0.250.0090.00315.46
7.0.240.0090.00615.32
7.0.230.0000.01415.35
7.0.220.0060.00615.33
7.0.210.0040.00815.32
7.0.200.0050.00515.05
7.0.190.0040.00715.18
7.0.180.0580.00914.79
7.0.170.0610.00214.74
7.0.160.0620.01014.64
7.0.150.0080.00514.85
7.0.140.0230.00614.87
7.0.130.0050.00714.98
7.0.120.0150.01114.87
7.0.110.0030.01014.80
7.0.100.0000.01214.97
7.0.90.0630.00914.96
7.0.80.0650.00514.85
7.0.70.0630.01014.80
7.0.60.0620.01414.69
7.0.50.0030.00715.02
7.0.40.0500.00813.90
7.0.30.0080.00813.99
7.0.20.0790.00514.13
7.0.10.0990.00713.98
7.0.00.1140.00513.75
5.6.380.0070.00714.55

preferences:
52.26 ms | 400 KiB | 5 Q