3v4l.org

run code in 300+ PHP versions simultaneously
<?php //Source: https://bugs.php.net/bug.php?id=64896 gc_disable(); class bad { private $_private = array(); public function __construct() { $this->_private[] = 'oh noes'; } public function __destruct() { //echo "bad::destructor\n"; global $bar; $bar = $this->_private; } } $foo = new stdclass; $foo->foo = $foo; $foo->bad = new bad; print_r($foo); for ($i=0; true; $i++) { $deep_clone = unserialize(serialize($foo)); gc_collect_cycles(); var_dump($i); }

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.0330.02916.50
8.3.50.0430.02916.35
8.3.40.0420.02518.89
8.3.30.0280.03818.81
8.3.20.0150.00618.60
8.3.10.0240.01320.61
8.3.00.0130.01019.38
8.2.180.0330.05316.63
8.2.170.0230.05522.96
8.2.160.0230.03920.53
8.2.150.0110.02524.18
8.2.140.0250.01624.66
8.2.130.0100.01426.16
8.2.120.0000.01820.92
8.2.110.0100.01721.03
8.2.100.0170.01317.78
8.2.90.0060.02219.30
8.2.80.0090.01219.32
8.2.70.0080.01317.63
8.2.60.0090.01317.68
8.2.50.0060.01818.07
8.2.40.0070.01418.22
8.2.30.0100.01318.05
8.2.20.0100.01017.86
8.2.10.0030.01817.73
8.2.00.0120.01617.79
8.1.280.0170.03025.92
8.1.270.0190.02324.66
8.1.260.0180.00326.35
8.1.250.0030.01728.09
8.1.240.0140.03122.61
8.1.230.0070.04020.92
8.1.220.0070.01417.74
8.1.210.0080.01918.77
8.1.200.0060.03217.35
8.1.190.0070.01717.52
8.1.180.0070.01718.10
8.1.170.0040.02118.75
8.1.160.0100.01018.80
8.1.150.0070.01418.70
8.1.140.0090.01217.36
8.1.130.0090.01517.80
8.1.120.0190.00617.36
8.1.110.0100.01017.40
8.1.100.0030.01717.34
8.1.90.0070.01417.34
8.1.80.0030.01717.51
8.1.70.0060.01617.28
8.1.60.0120.01217.52
8.1.50.0110.01117.45
8.1.40.0070.02117.59
8.1.30.0120.01217.61
8.1.20.0090.01217.64
8.1.10.0060.01517.58
8.1.00.0070.01417.40
8.0.300.0090.01219.83
8.0.290.0060.01516.58
8.0.280.0140.00718.21
8.0.270.0030.01717.20
8.0.260.0100.01716.68
8.0.250.0110.01816.95
8.0.240.0140.00716.82
8.0.230.0140.01016.71
8.0.220.0090.01516.85
8.0.210.0000.02016.80
8.0.200.0100.01016.88
8.0.190.0070.01416.93
8.0.180.0120.00916.68
8.0.170.0040.02516.83
8.0.160.0030.02316.79
8.0.150.0040.02416.80
8.0.140.0030.01816.80
8.0.130.0070.01413.31
8.0.120.0130.01016.68
8.0.110.0100.01616.60
8.0.100.0040.02316.66
8.0.90.0070.01416.71
8.0.80.0230.06016.84
8.0.70.0070.01416.63
8.0.60.0120.01516.60
8.0.50.0060.01516.61
8.0.30.0430.05816.92
8.0.20.0360.07616.85
8.0.10.0060.01516.85
8.0.00.0390.08116.68
7.4.330.0070.01012.93
7.4.320.0070.01316.46
7.4.300.0030.01616.23
7.4.290.0030.01716.38
7.4.280.0070.01916.29
7.4.270.0150.01216.38
7.4.260.0000.02513.21
7.4.250.0100.01916.46
7.4.240.0060.02216.46
7.4.230.0060.01416.44
7.4.220.0180.11716.36
7.4.210.0140.06216.38
7.4.200.0060.01316.52
7.4.190.0090.01216.53
7.4.160.0410.05816.50
7.4.150.0230.05316.35
7.4.140.0430.07416.32
7.4.130.0450.09316.49
7.4.120.0410.09316.37
7.4.110.0410.06916.26
7.4.100.0370.07816.37
7.4.90.0400.07716.39
7.4.80.0280.12219.39
7.4.70.0190.07416.32
7.4.60.0360.06716.56
7.4.50.0800.06316.29
7.4.40.0030.05716.34
7.4.30.0410.08416.45
7.4.00.0220.02214.82
7.3.330.0100.01413.25
7.3.320.0030.02413.32
7.3.310.0100.01616.25
7.3.300.0100.01016.27
7.3.290.0160.06116.25
7.3.280.0150.07516.21
7.3.270.0380.09616.35
7.3.260.0430.07316.24
7.3.250.0320.05916.47
7.3.240.0410.08716.31
7.3.230.0530.08016.43
7.3.210.0380.07816.30
7.3.200.0300.06616.22
7.3.190.0330.09016.29
7.3.180.0190.07216.46
7.3.170.0370.04616.45
7.3.160.0160.07416.34
7.3.120.0270.03015.00
7.2.330.0480.08416.49
7.2.320.0260.07216.55
7.2.310.0230.07516.64
7.2.300.0380.07816.41
7.2.290.0070.04816.47
7.2.60.0170.02116.80
7.2.00.0110.02519.30
7.1.200.0160.02615.64
7.1.100.0100.02118.08
7.1.70.0070.01416.83
7.1.60.0140.04519.40
7.1.50.0030.01717.14
7.1.00.0030.05722.16
7.0.200.0110.01816.77
7.0.140.0100.09321.94
7.0.120.0100.07722.06
7.0.100.0070.09719.95
7.0.90.0100.08719.93
7.0.80.0130.11320.02
7.0.70.0100.08020.01
7.0.60.0200.08720.05
7.0.50.0070.11720.37
7.0.40.0270.07720.01
7.0.30.0170.11020.10
7.0.20.0130.10019.96
7.0.10.0030.10320.04
7.0.00.0100.09719.98
5.6.280.0030.10020.83
5.6.250.0200.07720.56
5.6.240.0030.09720.78
5.6.230.0100.11720.75
5.6.220.0200.09020.70
5.6.210.0070.12020.50
5.6.200.0170.10321.14
5.6.190.0170.10020.96
5.6.180.0030.09321.11
5.6.170.0130.11721.04
5.6.160.0100.11320.96
5.6.150.0200.10321.06
5.6.140.0130.10321.02
5.6.130.0200.09320.91
5.6.120.0100.08021.11
5.6.110.0130.07321.09
5.6.100.0100.06321.07
5.6.90.0030.08721.04
5.6.80.0070.07720.51
5.6.70.0170.07020.51
5.6.60.0200.06320.41
5.6.50.0030.08720.46
5.6.40.0070.06020.52
5.6.30.0130.07720.40
5.6.20.0130.08020.43
5.6.10.0170.06720.39
5.6.00.0030.07720.50
5.5.380.0030.08320.56
5.5.370.0070.07720.40
5.5.360.0100.06320.42
5.5.350.0070.08320.50
5.5.340.0100.04720.88
5.5.330.0000.08320.86
5.5.320.0100.08020.93
5.5.310.0070.07720.79
5.5.300.0070.07720.89
5.5.290.0100.07720.85
5.5.280.0130.07320.78
5.5.270.0070.08020.80
5.5.260.0070.08020.90
5.5.250.0130.07720.74
5.5.240.0100.07720.04
5.5.230.0070.09020.20
5.5.220.0030.07720.22
5.5.210.0130.07320.27
5.5.200.0030.08720.19
5.5.190.0100.07020.23
5.5.180.0030.09020.23
5.5.160.0130.07320.17
5.5.150.0100.06720.27
5.5.140.0030.05320.18
5.5.130.0100.04720.17
5.5.120.0000.06320.30
5.5.110.0100.07320.26
5.5.100.0100.07720.07
5.5.90.0030.08320.02
5.5.80.0130.07020.15
5.5.70.0100.07319.96
5.5.60.0100.07720.08
5.5.50.0030.08020.09
5.5.40.0100.08020.04
5.5.30.0100.08020.07
5.5.20.0200.06320.04
5.5.10.0070.08020.14
5.5.00.0100.07720.01
5.4.450.0030.12719.46
5.4.440.0070.07019.45
5.4.430.0170.06719.12
5.4.420.0070.07019.30
5.4.410.0100.07019.26
5.4.400.0130.06319.07
5.4.390.0130.06318.80
5.4.380.0030.05018.88
5.4.370.0130.07318.81
5.4.360.0070.07718.98
5.4.350.0030.07718.79
5.4.340.0130.07319.04
5.4.320.0070.08018.93
5.4.310.0200.06319.04
5.4.300.0030.07018.83
5.4.290.0000.07018.96
5.4.280.0130.06719.13
5.4.270.0100.06719.16
5.4.260.0030.05018.94
5.4.250.0100.07018.96
5.4.240.0100.07319.04
5.4.230.0170.06719.05
5.4.220.0070.07719.01
5.4.210.0030.07318.97
5.4.200.0100.06718.83
5.4.190.0100.07318.80
5.4.180.0070.06318.83
5.4.170.0100.06719.12
5.4.160.0000.08718.78
5.4.150.0170.07019.04
5.4.140.0030.07316.46
5.4.130.0030.06316.37
5.4.120.0070.07316.39
5.4.110.0070.07316.50
5.4.100.0070.07316.44
5.4.90.0070.07716.28
5.4.80.0030.07716.48
5.4.70.0000.07716.32
5.4.60.0070.04016.37
5.4.50.0100.06316.35
5.4.40.0100.07016.35
5.4.30.0070.07316.25
5.4.20.0070.07016.46
5.4.10.0030.07716.28
5.4.00.0100.04315.87
5.3.290.0000.07714.57
5.3.280.0100.07314.50
5.3.270.0070.07714.49
5.3.260.0100.07314.51
5.3.250.0130.07014.37
5.3.240.0030.08014.38
5.3.230.0070.07314.50
5.3.220.0070.07014.34
5.3.210.0030.05714.45
5.3.200.0000.07714.43
5.3.190.0100.08014.42
5.3.180.0100.07014.52
5.3.170.0200.05714.48
5.3.160.0000.08014.32
5.3.150.0100.07014.52
5.3.140.0070.06314.38
5.3.130.0130.04714.36
5.3.120.0070.06714.50
5.3.110.0070.07314.45
5.3.100.0070.07314.07
5.3.90.0070.07014.07
5.3.80.0000.07714.07
5.3.70.0030.06014.07
5.3.60.0070.05314.07
5.3.50.0070.07314.07
5.3.40.0200.06314.07
5.3.30.0000.07314.07
5.3.20.0070.09322.83
5.3.10.0170.09023.81
5.3.00.0070.11322.14

preferences:
39.47 ms | 401 KiB | 5 Q