3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public function __construct() { $this->fp = fopen(__FILE__, 'r'); } public function __destruct() { fclose($this->fp); } public function __clone() { $this->fp = fopen(__FILE__, 'r'); } public function getFp() { return $this->fp; } } $t = new Test; var_dump($t->getFp()); // works $c = clone $t; var_dump($c->getFp()); // works var_dump((clone $t)->getFp()); // dtor'd before being accessed?

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.0100.00821.07
8.5.20.0090.00820.09
8.5.10.0110.00919.61
8.5.00.0120.01019.96
8.4.180.0120.01022.04
8.4.170.0160.00624.02
8.4.160.0150.00723.74
8.4.150.0080.00516.81
8.4.140.0130.00917.68
8.4.130.0140.00718.11
8.4.120.0110.00922.43
8.4.110.0140.00622.49
8.4.100.0150.00518.01
8.4.90.0110.00720.64
8.4.80.0130.00718.89
8.4.70.0130.00718.82
8.4.60.0090.01020.49
8.4.50.0070.01018.75
8.4.40.0130.00717.52
8.4.30.0030.01319.63
8.4.20.0170.00317.48
8.4.10.0070.01017.62
8.3.300.0120.00820.84
8.3.290.0110.01120.71
8.3.280.0120.00718.33
8.3.270.0120.00716.76
8.3.260.0070.00716.62
8.3.250.0080.00818.80
8.3.240.0100.00916.88
8.3.230.0060.00316.64
8.3.220.0110.00719.11
8.3.210.0110.00716.85
8.3.200.0040.00416.68
8.3.190.0130.00617.18
8.3.180.0040.00418.81
8.3.170.0120.00617.30
8.3.160.0070.01118.73
8.3.150.0000.01917.04
8.3.140.0040.00416.58
8.3.130.0060.00316.95
8.3.120.0150.00018.93
8.3.110.0060.00320.94
8.3.100.0050.00524.06
8.3.90.0050.00326.77
8.3.80.0090.00018.31
8.3.70.0130.00716.63
8.3.60.0080.00818.68
8.3.50.0120.00821.33
8.3.40.0130.00618.66
8.3.30.0070.00718.67
8.3.20.0000.00820.23
8.3.10.0030.00523.70
8.3.00.0100.00019.38
8.2.300.0120.01418.26
8.2.290.0120.00816.35
8.2.280.0070.00418.41
8.2.270.0100.01022.55
8.2.260.0100.00717.11
8.2.250.0090.00616.84
8.2.240.0060.00317.05
8.2.230.0070.00322.58
8.2.220.0040.00437.54
8.2.210.0110.00426.77
8.2.200.0100.00316.63
8.2.190.0130.00616.63
8.2.180.0160.00316.50
8.2.170.0040.01122.96
8.2.160.0070.00719.16
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0040.00419.89
8.2.110.0060.00320.96
8.2.100.0040.00717.91
8.2.90.0000.00819.28
8.2.80.0040.00417.97
8.2.70.0000.00817.63
8.2.60.0070.00018.03
8.2.50.0040.00418.10
8.2.40.0050.00220.42
8.2.30.0050.00319.20
8.2.20.0040.00417.95
8.2.10.0040.00418.26
8.2.00.0040.00418.15
8.1.340.0100.00821.48
8.1.330.0120.00916.23
8.1.320.0090.01118.13
8.1.310.0100.00716.80
8.1.300.0120.00616.94
8.1.290.0030.00618.88
8.1.280.0100.00625.92
8.1.270.0040.00423.63
8.1.260.0090.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00323.85
8.1.230.0000.01119.21
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.23
8.1.190.0030.00617.36
8.1.180.0040.00418.10
8.1.170.0040.00418.56
8.1.160.0040.00418.84
8.1.150.0040.00420.09
8.1.140.0000.00719.50
8.1.130.0080.00019.03
8.1.120.0040.00417.45
8.1.110.0030.00517.42
8.1.100.0000.00717.41
8.1.90.0030.00617.31
8.1.80.0060.00317.41
8.1.70.0030.00317.39
8.1.60.0000.00817.48
8.1.50.0080.00017.50
8.1.40.0000.00817.43
8.1.30.0030.00617.71
8.1.20.0080.00017.63
8.1.10.0040.00417.57
8.1.00.0040.00417.37
8.0.300.0040.00418.77
8.0.290.0080.00016.63
8.0.280.0000.00718.38
8.0.270.0000.00817.33
8.0.260.0000.00719.02
8.0.250.0030.00516.86
8.0.240.0070.00016.84
8.0.230.0070.00016.97
8.0.220.0070.00016.91
8.0.210.0050.00216.96
8.0.200.0030.00316.98
8.0.190.0030.00616.95
8.0.180.0000.00816.91
8.0.170.0070.00016.82
8.0.160.0030.00616.96
8.0.150.0060.00316.80
8.0.140.0000.00716.91
8.0.130.0030.00313.38
8.0.120.0000.00716.76
8.0.110.0070.00016.78
8.0.100.0050.00316.79
8.0.90.0040.00417.02
8.0.80.0070.00716.86
8.0.70.0000.00816.73
8.0.60.0030.00516.96
8.0.50.0000.00716.93
8.0.30.0100.00817.18
8.0.20.0130.00617.40
8.0.10.0000.00816.99
8.0.00.0040.01516.78
7.4.330.0030.00315.55
7.4.320.0060.00016.36
7.4.300.0000.00616.65
7.4.290.0030.00616.52
7.4.280.0040.00516.61
7.4.270.0080.00016.48
7.4.260.0040.00416.57
7.4.250.0000.00816.57
7.4.240.0000.00716.66
7.4.230.0000.00616.45
7.4.220.0100.00916.47
7.4.210.0030.01016.55
7.4.200.0000.00716.71
7.4.160.0080.00816.44
7.4.150.0070.01317.40
7.4.140.0130.00917.86
7.4.130.0060.01616.51
7.4.120.0130.00816.48
7.4.110.0100.01016.29
7.4.100.0100.00716.44
7.4.90.0120.01216.61
7.4.80.0040.01319.39
7.4.70.0080.01116.50
7.4.60.0030.01216.52
7.4.50.0100.00616.66
7.4.40.0070.01016.67
7.4.30.0100.00716.60
7.4.00.0030.01314.97
7.3.330.0030.00313.15
7.3.320.0060.00013.32
7.3.310.0070.00016.27
7.3.300.0030.00316.32
7.3.290.0030.01416.40
7.3.280.0120.00816.36
7.3.270.0100.00717.40
7.3.260.0060.01116.46
7.3.240.0150.00516.46
7.3.230.0090.01216.18
7.3.210.0030.01316.42
7.3.200.0060.01316.60
7.3.190.0130.00316.57
7.3.180.0100.00716.19
7.3.170.0060.01016.34
7.3.160.0090.00716.42
7.3.10.0030.01016.21
7.3.00.0090.00316.55
7.2.330.0070.01116.82
7.2.320.0110.00716.75
7.2.310.0060.01016.89
7.2.300.0090.00916.59
7.2.290.0100.01016.65
7.2.130.0000.01516.78
7.2.120.0070.00716.97
7.2.110.0060.00616.89
7.2.100.0140.00016.64
7.2.90.0100.00716.89
7.2.80.0040.00616.74
7.2.70.0080.00817.08
7.2.60.0060.01016.88
7.2.50.0030.01016.89
7.2.40.0110.00016.84
7.2.30.0040.00816.77
7.2.20.0060.00916.91
7.2.10.0040.00917.00
7.2.00.0060.00317.86
7.1.250.0030.01015.77
7.1.200.0030.00915.71
7.1.70.0040.00417.08
7.1.60.0000.01017.33
7.1.50.0060.01616.84
7.1.40.0670.01232.32
7.1.30.0600.01332.50
7.1.20.0700.01332.55
7.1.10.0600.00314.54
7.1.00.0600.01014.66
7.0.200.0070.00716.72
7.0.180.0770.01714.10
7.0.170.0830.01014.35
7.0.160.0630.00714.43
7.0.150.1570.00314.34
7.0.140.0530.01014.33
7.0.130.0600.01014.49
7.0.120.0670.01014.58
7.0.110.0930.01314.58
7.0.100.0900.01314.16
7.0.90.0730.01014.61
7.0.80.0570.01014.63
7.0.70.0870.01014.45
7.0.60.0730.00714.09
7.0.50.0700.00314.58
7.0.40.0670.00314.52
7.0.30.0600.01014.48
7.0.20.0900.01014.48
7.0.10.0570.00714.61
7.0.00.0530.01014.52

preferences:
98 ms | 1516 KiB | 5 Q