3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ObjectWithReferences { protected $var1; protected $var2; protected $var3; public function __construct() { $this->var1 = new StdClass(); $this->var2 = null; $this->var3 = $this->var1; } } class WrapperObject implements Serializable { static $tempstorage; protected $obj; public function setObject($obj) { $this->obj = $obj; } public function getObject() { if (is_string($this->obj)) { $this->obj = unserialize($this->obj); } return $this->obj; } public function serialize() { return serialize($this->obj); } public function unserialize($serialized) { $this->obj = $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.0120.00618.80
8.3.50.0230.00521.21
8.3.40.0080.00818.55
8.3.30.0040.01220.29
8.3.20.0040.00420.23
8.3.10.0080.00021.09
8.3.00.0050.00323.71
8.2.180.0070.01316.75
8.2.170.0180.00422.96
8.2.160.0030.01020.53
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0070.00021.00
8.2.110.0030.00619.39
8.2.100.0120.00017.91
8.2.90.0000.00819.22
8.2.80.0030.00517.97
8.2.70.0060.00617.63
8.2.60.0080.00017.93
8.2.50.0030.00518.07
8.2.40.0060.00320.07
8.2.30.0040.00419.50
8.2.20.0040.00417.54
8.2.10.0040.00417.57
8.2.00.0040.00417.56
8.1.280.0130.00625.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0050.00520.60
8.1.230.0070.00420.84
8.1.220.0000.00818.77
8.1.210.0060.00318.97
8.1.200.0060.00317.36
8.1.190.0000.00717.53
8.1.180.0060.00318.10
8.1.170.0090.00318.44
8.1.160.0040.00418.89
8.1.150.0000.00718.70
8.1.140.0040.00417.46
8.1.130.0000.00717.84
8.1.120.0000.00717.52
8.1.110.0030.00617.45
8.1.100.0000.00817.44
8.1.90.0000.00717.36
8.1.80.0070.00017.49
8.1.70.0030.00317.37
8.1.60.0050.00317.58
8.1.50.0030.00617.51
8.1.40.0030.00517.51
8.1.30.0000.00917.68
8.1.20.0000.00817.69
8.1.10.0070.00017.42
8.1.00.0000.00817.52
8.0.300.0000.00719.89
8.0.290.0070.00017.18
8.0.280.0030.00318.52
8.0.270.0000.00717.31
8.0.260.0080.00016.88
8.0.250.0000.00817.10
8.0.240.0000.00717.07
8.0.230.0000.00816.91
8.0.220.0000.00716.95
8.0.210.0030.00316.82
8.0.200.0040.00417.01
8.0.190.0030.00617.09
8.0.180.0000.00717.00
8.0.170.0000.00816.89
8.0.160.0000.00717.01
8.0.150.0050.00216.78
8.0.140.0070.00416.82
8.0.130.0000.00513.39
8.0.120.0090.00016.79
8.0.110.0000.00816.77
8.0.100.0000.00716.81
8.0.90.0050.00216.84
8.0.80.0040.01216.98
8.0.70.0000.00716.79
8.0.60.0000.00816.93
8.0.50.0030.00516.84
8.0.30.0120.01017.10
8.0.20.0070.01317.40
8.0.10.0030.00517.14
8.0.00.0140.01116.87
7.4.330.0000.00516.84
7.4.320.0030.00316.57
7.4.300.0060.00016.51
7.4.290.0030.00316.59
7.4.280.0070.00016.47
7.4.270.0070.00016.48
7.4.260.0000.00513.16
7.4.250.0040.00416.62
7.4.240.0080.00016.63
7.4.230.0070.00016.68
7.4.220.0030.01516.63
7.4.210.0060.01016.56
7.4.200.0070.00016.49
7.4.190.0000.00716.43
7.4.160.0130.00316.39
7.4.150.0170.00017.40
7.4.140.0090.01217.86
7.4.130.0090.01016.49
7.4.120.0100.01016.48
7.4.110.0030.01316.33
7.4.100.0070.01716.70
7.4.90.0140.00316.46
7.4.80.0080.00819.39
7.4.70.0060.01016.28
7.4.60.0110.00616.51
7.4.50.0040.00416.40
7.4.40.0080.00222.77
7.4.30.0110.00616.39
7.4.00.0080.00814.96
7.3.330.0050.00013.41
7.3.320.0050.00013.41
7.3.310.0030.00316.36
7.3.300.0050.00216.45
7.3.290.0040.01116.38
7.3.280.0080.01116.37
7.3.270.0060.01217.40
7.3.260.0120.00918.24
7.3.250.0130.00716.53
7.3.240.0070.01016.50
7.3.230.0190.00316.41
7.3.210.0120.00616.46
7.3.200.0090.01219.39
7.3.190.0090.01216.43
7.3.180.0160.00416.55
7.3.170.0030.01216.56
7.3.160.0060.01116.67
7.3.120.0030.01215.07
7.2.330.0130.00716.87
7.2.320.0120.00916.80
7.2.310.0140.01016.42
7.2.300.0090.00916.71
7.2.290.0130.00316.48
7.1.70.0060.00316.85
7.1.60.0060.01819.17
7.1.50.0060.01216.64
7.1.00.0000.03722.36
7.0.200.0020.00516.72
7.0.140.0000.07722.00
7.0.100.0270.04019.99
7.0.90.0170.04020.03
7.0.80.0100.07019.84
7.0.70.0330.04319.88
7.0.60.0330.07719.98
7.0.50.0170.08320.37
7.0.40.0030.04020.05
7.0.30.0030.04320.00
7.0.20.0100.03720.00
7.0.10.0070.06020.07
7.0.00.0000.04720.09
5.6.280.0100.06320.97
5.6.250.0070.07320.67
5.6.240.0070.06320.67
5.6.230.0030.04320.72
5.6.220.0100.07720.59
5.6.210.0070.03720.56
5.6.200.0070.04721.15
5.6.190.0000.04720.96
5.6.180.0100.03320.94
5.6.170.0070.04021.05
5.6.160.0030.05321.12
5.6.150.0100.05721.07
5.6.140.0030.04321.07
5.6.130.0070.06021.07
5.6.120.0030.04320.99
5.6.110.0130.05721.02
5.6.100.0170.06321.11
5.6.90.0070.05021.05
5.6.80.0070.04320.44
5.6.70.0100.05720.49
5.6.60.0030.04020.52
5.6.50.0000.08320.42
5.6.40.0070.07720.33
5.6.30.0100.06720.45
5.6.20.0130.07320.39
5.6.10.0070.07320.54
5.6.00.0100.07320.40
5.5.380.0170.05020.40
5.5.370.0000.04720.43
5.5.360.0170.04720.35
5.5.350.0130.07320.36
5.5.340.0070.03720.78
5.5.330.0100.03320.89
5.5.320.0100.03720.80
5.5.310.0030.04020.93
5.5.300.0100.04020.81
5.5.290.0030.06020.93
5.5.280.0070.04020.64
5.5.270.0070.04020.90
5.5.260.0030.04320.80
5.5.250.0030.04020.63
5.5.240.0030.04020.15
5.5.230.0200.05320.03
5.5.220.0030.07720.17
5.5.210.0070.03720.29
5.5.200.0100.07320.18
5.5.190.0200.06320.27
5.5.180.0070.08020.28
5.5.160.0200.06320.25
5.5.150.0070.07720.21
5.5.140.0100.07320.10
5.5.130.0070.07720.21
5.5.120.0170.06320.07
5.5.110.0130.07020.27
5.5.100.0070.07720.17
5.5.90.0170.07020.19
5.5.80.0070.07720.12
5.5.70.0100.06720.15
5.5.60.0130.03720.11
5.5.50.0100.07020.16
5.5.40.0000.08320.07
5.5.30.0070.08320.11
5.5.20.0070.07020.12
5.5.10.0100.07020.11
5.5.00.0070.06320.03
5.4.450.0170.03019.21
5.4.440.0100.04019.56
5.4.430.0030.04019.37
5.4.420.0030.04019.37
5.4.410.0000.04019.38
5.4.400.0000.04319.14
5.4.390.0070.05018.86
5.4.380.0000.04019.18
5.4.370.0070.07319.13
5.4.360.0030.05019.05
5.4.350.0100.07019.25
5.4.340.0100.07018.95
5.4.320.0100.08018.90
5.4.310.0100.08019.14
5.4.300.0200.06019.16
5.4.290.0070.04319.16
5.4.280.0130.06719.20
5.4.270.0030.07719.09
5.4.260.0130.06719.09
5.4.250.0100.07319.04
5.4.240.0100.06719.13
5.4.230.0130.07319.16
5.4.220.0100.07719.15
5.4.210.0100.06019.23
5.4.200.0100.07019.04
5.4.190.0130.06719.04
5.4.180.0030.07718.94
5.4.170.0070.07719.02
5.4.160.0100.07719.20
5.4.150.0130.07319.11
5.4.140.0100.07016.29
5.4.130.0100.04316.36
5.4.120.0070.06316.36
5.4.110.0070.04016.34
5.4.100.0070.07716.39
5.4.90.0130.06316.39
5.4.80.0070.07016.45
5.4.70.0130.06716.47
5.4.60.0170.05716.34
5.4.50.0070.08016.33
5.4.40.0070.07016.50
5.4.30.0030.08016.44
5.4.20.0200.05716.51
5.4.10.0070.07016.31
5.4.00.0030.07715.84
5.3.290.0070.07714.74
5.3.280.0130.06714.58
5.3.270.0030.07714.65
5.3.260.0100.07314.68
5.3.250.0130.06314.59
5.3.240.0130.06314.59
5.3.230.0070.04014.73
5.3.220.0100.07014.70
5.3.210.0100.07314.57
5.3.200.0070.07014.59
5.3.190.0230.06314.51
5.3.180.0170.06314.68
5.3.170.0030.04014.57
5.3.160.0100.04714.53
5.3.150.0070.07314.56
5.3.140.0070.07714.64
5.3.130.0130.07014.57
5.3.120.0130.06714.59
5.3.110.0030.08014.63
5.3.100.0070.07014.04
5.3.90.0100.07014.09
5.3.80.0070.06714.13
5.3.70.0170.03013.92
5.3.60.0100.07314.04
5.3.50.0130.06713.95
5.3.40.0130.06714.00
5.3.30.0100.07014.04
5.3.20.0000.05713.76
5.3.10.0070.06313.70
5.3.00.0130.06713.79
5.2.170.0030.06311.27
5.2.160.0100.06011.26
5.2.150.0000.06011.18
5.2.140.0030.05711.29
5.2.130.0100.05311.18
5.2.120.0070.05711.03
5.2.110.0000.03710.98
5.2.100.0070.06011.00
5.2.90.0170.05311.13
5.2.80.0100.04711.13
5.2.70.0070.06011.14
5.2.60.0030.06311.18
5.2.50.0030.06311.04
5.2.40.0100.06010.88
5.2.30.0130.04711.04
5.2.20.0030.06311.03
5.2.10.0070.05710.81
5.2.00.0070.05310.76
5.1.60.0000.0579.85
5.1.50.0000.05710.11
5.1.40.0070.0509.98
5.1.30.0000.05710.34
5.1.20.0000.03710.50
5.1.10.0070.04010.08
5.1.00.0100.04310.19
5.0.50.0130.0378.67
5.0.40.0130.0378.46
5.0.30.0000.0678.20
5.0.20.0000.0378.32
5.0.10.0100.0378.25
5.0.00.0070.0578.16
4.4.90.0000.0378.16
4.4.80.0000.0208.16
4.4.70.0000.0408.16
4.4.60.0000.0378.16
4.4.50.0030.0338.16
4.4.40.0030.0478.16
4.4.30.0000.0208.16
4.4.20.0030.0308.16
4.4.10.0030.0338.16
4.4.00.0000.0608.16
4.3.110.0030.0378.16
4.3.100.0030.0338.16
4.3.90.0130.0238.16
4.3.80.0030.0478.16
4.3.70.0030.0338.16
4.3.60.0070.0308.16
4.3.50.0030.0338.16
4.3.40.0030.0508.16
4.3.30.0000.0408.16
4.3.20.0000.0378.16
4.3.10.0000.0378.16
4.3.00.0030.0308.16

preferences:
39.97 ms | 401 KiB | 5 Q