3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ObjectWithReferences { protected $var1; protected $var2; public function __construct() { $this->var1 = new StdClass(); $this->var2 = $this->var1; } } class WrapperObject implements Serializable { static $tempstorage; protected $obj; public function setObject($obj) { $this->obj = $obj; } public function getObject() { return $this->obj; } public function serialize() { unserialize(serialize(new \StdClass)); return serialize($this->obj); } public function unserialize($serialized) { $this->obj = unserialize($serialized); } } $owr = new ObjectWithReferences(); $wrapper = new WrapperObject(); $wrapper->setObject($owr); var_dump($wrapper->getObject()); $wrapper = unserialize(serialize($wrapper)); var_dump($wrapper->getObject());

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.0150.00018.68
8.3.50.0120.00421.14
8.3.40.0140.00318.72
8.3.30.0030.01020.00
8.3.20.0080.00020.48
8.3.10.0040.00421.00
8.3.00.0040.00423.71
8.2.180.0100.00716.50
8.2.170.0120.00922.96
8.2.160.0070.01420.53
8.2.150.0040.01124.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0040.00421.12
8.2.110.0040.00419.16
8.2.100.0080.00417.72
8.2.90.0070.00019.17
8.2.80.0060.00318.03
8.2.70.0040.00417.50
8.2.60.0000.00918.04
8.2.50.0000.01018.07
8.2.40.0000.00818.16
8.2.30.0080.00019.52
8.2.20.0050.00317.67
8.2.10.0070.00017.76
8.2.00.0000.00817.69
8.1.280.0090.00625.92
8.1.270.0080.00023.99
8.1.260.0070.00026.35
8.1.250.0070.00028.09
8.1.240.0090.00023.94
8.1.230.0060.00620.94
8.1.220.0030.00618.77
8.1.210.0050.00219.01
8.1.200.0000.00917.47
8.1.190.0000.00817.66
8.1.180.0060.00618.10
8.1.170.0040.00418.50
8.1.160.0040.00418.96
8.1.150.0050.00318.55
8.1.140.0000.00817.54
8.1.130.0000.00817.85
8.1.120.0040.00417.41
8.1.110.0040.00417.44
8.1.100.0040.00417.55
8.1.90.0000.00717.36
8.1.80.0000.00817.38
8.1.70.0000.00817.49
8.1.60.0060.00317.49
8.1.50.0050.00217.40
8.1.40.0090.00017.42
8.1.30.0000.00817.69
8.1.20.0000.00917.65
8.1.10.0000.00717.52
8.1.00.0070.00017.43
8.0.300.0050.00319.88
8.0.290.0000.00817.15
8.0.280.0070.00018.38
8.0.270.0040.00417.25
8.0.260.0060.00316.91
8.0.250.0060.00317.09
8.0.240.0040.00416.96
8.0.230.0030.00316.94
8.0.220.0030.00316.88
8.0.210.0040.00416.98
8.0.200.0030.00317.01
8.0.190.0030.00316.99
8.0.180.0040.00416.93
8.0.170.0040.00416.99
8.0.160.0000.00717.06
8.0.150.0040.00416.93
8.0.140.0060.00616.90
8.0.130.0050.00013.45
8.0.120.0050.00316.96
8.0.110.0000.00816.82
8.0.100.0030.00516.78
8.0.90.0040.00417.00
8.0.80.0100.00717.02
8.0.70.0050.00316.83
8.0.60.0030.00516.80
8.0.50.0040.00416.81
8.0.30.0120.00717.00
8.0.20.0080.01017.40
8.0.10.0040.00417.17
8.0.00.0080.01316.97
7.4.330.0000.00516.79
7.4.320.0000.00616.61
7.4.300.0040.00416.63
7.4.290.0070.00016.57
7.4.280.0050.00316.65
7.4.270.0030.00316.68
7.4.260.0000.00613.35
7.4.250.0040.00416.63
7.4.240.0070.00016.52
7.4.230.0080.00016.66
7.4.220.0070.01116.49
7.4.210.0060.01016.53
7.4.200.0000.00716.65
7.4.190.0000.00716.57
7.4.160.0110.00616.57
7.4.150.0120.00617.40
7.4.140.0080.01217.86
7.4.130.0040.01316.58
7.4.120.0110.01016.57
7.4.110.0110.00616.55
7.4.100.0130.00716.65
7.4.90.0170.00016.38
7.4.80.0100.00719.39
7.4.70.0090.00616.77
7.4.60.0070.01016.49
7.4.50.0030.00516.73
7.4.40.0070.01122.77
7.4.30.0150.00716.42
7.4.00.0030.01514.93
7.3.330.0000.00613.38
7.3.320.0030.00313.39
7.3.310.0000.00616.39
7.3.300.0000.00716.37
7.3.290.0100.00716.42
7.3.280.0080.00916.42
7.3.270.0070.01017.40
7.3.260.0130.00718.24
7.3.250.0060.01116.61
7.3.240.0100.00716.64
7.3.230.0110.00616.53
7.3.210.0060.01316.43
7.3.200.0100.01519.39
7.3.190.0130.00816.38
7.3.180.0120.00916.52
7.3.170.0100.00616.57
7.3.160.0130.00816.65
7.3.120.0040.01515.03
7.2.330.0100.01016.78
7.2.320.0060.01116.61
7.2.310.0090.01216.55
7.2.300.0060.01016.44
7.2.290.0120.00616.83
7.2.60.0030.01016.80
7.1.200.0130.00016.05
7.1.70.0040.00417.04
7.1.60.0080.01519.17
7.1.50.0090.00916.99
7.1.00.0100.06722.27
7.0.200.0000.00716.82
7.0.140.0000.07722.06
7.0.110.0070.03720.03
7.0.100.0070.04719.93
7.0.90.0030.04319.81
7.0.80.0100.05319.88
7.0.70.0030.07019.90
7.0.60.0000.06319.97
7.0.50.0070.07020.48
7.0.40.0030.04020.05
7.0.30.0030.05320.16
7.0.20.0170.04720.18
7.0.10.0070.08020.13
7.0.00.0000.08320.12
5.6.280.0070.06720.91
5.6.260.0100.04020.61
5.6.250.0070.03720.45
5.6.240.0030.04320.63
5.6.230.0030.04320.66
5.6.220.0130.05720.63
5.6.210.0030.04020.66
5.6.200.0100.03321.15
5.6.190.0000.04721.14
5.6.180.0030.07721.28
5.6.170.0070.08020.95
5.6.160.0100.06020.97
5.6.150.0130.08021.14
5.6.140.0130.08721.00
5.6.130.0130.07321.13
5.6.120.0100.07321.20
5.6.110.0030.09021.05
5.6.100.0070.08020.94
5.6.90.0200.06720.94
5.6.80.0130.07320.38
5.6.70.0000.05720.34
5.6.60.0070.08020.32
5.6.50.0070.06720.51
5.6.40.0100.04320.48
5.6.30.0170.06320.30
5.6.20.0030.05020.63
5.6.10.0030.05720.61
5.6.00.0130.07320.29
5.5.380.0070.04320.52
5.5.370.0070.06320.52
5.5.360.0100.06020.52
5.5.350.0000.04320.33
5.5.340.0070.03721.00
5.5.330.0030.04320.80
5.5.320.0030.04020.88
5.5.310.0030.08021.03
5.5.300.0030.09020.71
5.5.290.0100.07721.05
5.5.280.0070.07020.82
5.5.270.0170.04020.93
5.5.260.0030.08020.95
5.5.250.0070.07720.60
5.5.240.0200.06020.21
5.5.230.0000.08720.27
5.5.220.0030.08020.33
5.5.210.0130.07020.09
5.5.200.0170.07020.32
5.5.190.0170.07320.06
5.5.180.0100.08020.06
5.5.160.0100.04020.09
5.5.150.0070.07320.24
5.5.140.0100.07320.31
5.5.130.0100.06720.06
5.5.120.0070.07320.31
5.5.110.0100.07720.34
5.5.100.0170.07020.29
5.5.90.0070.04720.26
5.5.80.0070.04720.06
5.5.70.0170.06320.05
5.5.60.0000.07720.05
5.5.50.0130.07020.19
5.5.40.0100.06020.14
5.5.30.0130.07320.04
5.5.20.0200.06720.11
5.5.10.0100.07020.04
5.5.00.0030.05320.11
5.4.450.0100.07019.67
5.4.440.0030.08019.31
5.4.430.0070.07719.33
5.4.420.0130.06719.41
5.4.410.0170.06319.20
5.4.400.0130.06718.95
5.4.390.0070.07019.01
5.4.380.0070.07019.00
5.4.370.0130.07019.34
5.4.360.0030.05019.35
5.4.350.0070.08019.01
5.4.340.0170.06018.97
5.4.320.0100.07019.32
5.4.310.0070.07319.19
5.4.300.0070.06718.97
5.4.290.0170.05318.99
5.4.280.0100.06719.08
5.4.270.0100.07319.00
5.4.260.0030.07319.17
5.4.250.0030.07319.23
5.4.240.0070.08318.94
5.4.230.0030.05019.17
5.4.220.0130.06719.02
5.4.210.0100.07719.16
5.4.200.0100.07318.95
5.4.190.0130.07319.00
5.4.180.0070.08318.98
5.4.170.0030.08318.98
5.4.160.0070.05319.16
5.4.150.0070.04719.17
5.4.140.0130.05716.49
5.4.130.0100.04316.44
5.4.120.0070.07016.46
5.4.110.0100.07016.50
5.4.100.0100.06716.54
5.4.90.0100.06316.47
5.4.80.0030.07716.41
5.4.70.0100.06716.46
5.4.60.0000.07716.53
5.4.50.0070.07016.44
5.4.40.0130.05716.60
5.4.30.0100.05316.56
5.4.20.0130.06316.48
5.4.10.0030.06316.24
5.4.00.0000.05315.72
5.3.290.0200.03714.54
5.3.280.0070.07714.64
5.3.270.0100.07014.68
5.3.260.0070.07314.75
5.3.250.0070.04014.71
5.3.240.0130.06714.75
5.3.230.0100.06714.84
5.3.220.0100.05314.67
5.3.210.0070.07714.56
5.3.200.0030.08014.44
5.3.190.0070.07714.63
5.3.180.0170.06714.67
5.3.170.0130.06714.57
5.3.160.0000.08714.72
5.3.150.0070.05714.56
5.3.140.0030.08014.70
5.3.130.0070.07314.52
5.3.120.0030.07714.58
5.3.110.0070.07714.57
5.3.100.0070.04014.20
5.3.90.0070.07014.03
5.3.80.0030.08014.00
5.3.70.0170.04314.04
5.3.60.0030.07014.15
5.3.50.0100.05013.92
5.3.40.0030.06314.19
5.3.30.0100.06713.79
5.3.20.0100.06713.94
5.3.10.0100.06713.73
5.3.00.0070.06713.74
5.2.170.0030.06012.33
5.2.160.0100.05312.33
5.2.150.0030.06012.33
5.2.140.0070.06012.33
5.2.130.0030.06312.33
5.2.120.0070.05712.33
5.2.110.0100.05712.33
5.2.100.0000.03712.33
5.2.90.0000.06712.33
5.2.80.0030.06312.33
5.2.70.0070.05312.33
5.2.60.0170.05312.33
5.2.50.0030.06312.33
5.2.40.0030.04312.33
5.2.30.0070.05712.33
5.2.20.0030.06712.33
5.2.10.0030.06312.33
5.2.00.0070.02712.33
5.1.60.0000.02712.33
5.1.50.0030.05012.33
5.1.40.0070.04712.33
5.1.30.0100.05012.33
5.1.20.0070.05312.33
5.1.10.0100.05312.33
5.1.00.0130.04012.33
5.0.50.0030.04712.33
5.0.40.0100.03312.33
5.0.30.0070.03312.33
5.0.20.0030.04312.33
5.0.10.0030.04312.33
5.0.00.0030.06012.33
4.4.90.0100.01312.33
4.4.80.0000.03712.33
4.4.70.0000.03712.33
4.4.60.0030.03012.33
4.4.50.0000.03712.33
4.4.40.0000.05012.33
4.4.30.0030.03712.33
4.4.20.0070.01312.33
4.4.10.0030.03712.33
4.4.00.0000.05312.33
4.3.110.0070.03312.33
4.3.100.0000.03712.33
4.3.90.0130.01712.33
4.3.80.0000.03712.33
4.3.70.0000.03712.33
4.3.60.0000.03712.33
4.3.50.0000.03712.33
4.3.40.0030.03712.33
4.3.30.0000.03312.33
4.3.20.0000.03012.33
4.3.10.0000.02712.33
4.3.00.0000.02012.33

preferences:
62.25 ms | 401 KiB | 5 Q