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() { return $this->obj; } public function serialize() { 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.70.0100.01016.63
8.3.60.0150.00418.55
8.3.50.0110.00721.27
8.3.40.0110.00418.84
8.3.30.0070.00720.34
8.3.20.0090.00020.59
8.3.10.0000.00820.92
8.3.00.0040.00423.53
8.2.180.0140.00717.00
8.2.170.0110.00322.96
8.2.160.0110.00320.53
8.2.150.0090.00624.18
8.2.140.0050.00224.66
8.2.130.0030.00526.16
8.2.120.0040.00421.07
8.2.110.0030.00719.25
8.2.100.0040.00817.97
8.2.90.0060.00319.22
8.2.80.0000.00818.05
8.2.70.0050.00517.25
8.2.60.0040.00417.80
8.2.50.0080.00018.07
8.2.40.0080.00019.95
8.2.30.0040.00419.37
8.2.20.0050.00317.79
8.2.10.0070.00017.72
8.2.00.0080.00017.70
8.1.280.0090.00925.92
8.1.270.0040.00423.99
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.30
8.1.230.0080.00320.89
8.1.220.0000.00818.77
8.1.210.0080.00019.09
8.1.200.0000.01017.48
8.1.190.0040.00417.64
8.1.180.0050.00318.10
8.1.170.0030.00618.58
8.1.160.0050.00218.87
8.1.150.0000.00718.70
8.1.140.0040.00417.46
8.1.130.0000.00717.77
8.1.120.0040.00417.47
8.1.110.0080.00017.36
8.1.100.0000.00717.51
8.1.90.0040.00417.49
8.1.80.0020.00517.41
8.1.70.0030.00317.49
8.1.60.0000.00817.43
8.1.50.0000.00917.47
8.1.40.0080.00017.49
8.1.30.0050.00217.62
8.1.20.0050.00317.75
8.1.10.0040.00417.54
8.1.00.0000.00717.52
8.0.300.0060.00319.97
8.0.290.0040.00417.18
8.0.280.0070.00018.36
8.0.270.0000.00817.22
8.0.260.0060.00316.91
8.0.250.0070.00017.04
8.0.240.0000.00716.93
8.0.230.0080.00017.05
8.0.220.0000.00716.87
8.0.210.0070.00017.02
8.0.200.0000.00616.92
8.0.190.0040.00417.02
8.0.180.0050.00216.99
8.0.170.0000.00716.98
8.0.160.0000.00816.96
8.0.150.0000.00716.95
8.0.140.0040.00816.93
8.0.130.0000.00513.33
8.0.120.0000.00817.00
8.0.110.0000.00816.84
8.0.100.0040.00416.84
8.0.90.0020.00516.83
8.0.80.0110.00417.07
8.0.70.0030.00516.80
8.0.60.0000.00816.97
8.0.50.0040.00416.79
8.0.30.0080.01117.10
8.0.20.0140.00417.40
8.0.10.0060.00316.95
8.0.00.0110.00916.82
7.4.330.0050.00016.78
7.4.320.0030.00316.60
7.4.300.0000.00616.67
7.4.290.0030.00316.54
7.4.280.0080.00016.43
7.4.270.0030.00516.64
7.4.260.0030.00313.31
7.4.250.0060.00316.44
7.4.240.0000.00816.68
7.4.230.0040.00416.43
7.4.220.0090.00916.51
7.4.210.0090.00816.58
7.4.200.0030.00316.63
7.4.190.0040.00416.60
7.4.160.0120.00416.57
7.4.150.0120.00617.40
7.4.140.0180.00517.86
7.4.130.0090.00916.40
7.4.120.0090.01016.53
7.4.110.0090.00916.31
7.4.100.0030.01516.66
7.4.90.0080.00816.52
7.4.80.0100.00719.39
7.4.70.0080.00916.34
7.4.60.0030.01316.68
7.4.50.0050.00516.35
7.4.40.0100.00722.77
7.4.30.0070.01016.49
7.4.00.0040.01414.85
7.3.330.0000.00513.29
7.3.320.0000.00513.29
7.3.310.0000.00716.39
7.3.300.0000.00716.31
7.3.290.0070.00716.32
7.3.280.0100.00716.36
7.3.270.0130.00417.40
7.3.260.0100.00918.24
7.3.250.0080.00916.48
7.3.240.0090.01016.64
7.3.230.0100.00616.57
7.3.210.0120.00616.68
7.3.200.0060.01519.39
7.3.190.0090.00916.20
7.3.180.0030.01516.42
7.3.170.0110.00416.51
7.3.160.0080.00816.48
7.3.120.0070.00714.85
7.3.110.0060.00814.94
7.3.100.0040.01215.05
7.3.90.0060.00814.83
7.3.80.0040.00814.84
7.3.70.0080.00614.70
7.3.60.0070.01114.90
7.3.50.0100.00614.97
7.3.40.0110.00015.03
7.3.30.0070.01014.74
7.3.20.0000.01516.70
7.3.10.0080.00816.51
7.3.00.0180.00716.51
7.2.330.0070.01016.80
7.2.320.0140.00516.72
7.2.310.0090.01216.88
7.2.300.0090.00916.48
7.2.290.0030.01316.46
7.2.240.0100.00314.96
7.2.230.0060.00914.94
7.2.220.0080.00814.80
7.2.210.0070.01015.16
7.2.200.0030.00914.91
7.2.190.0000.01915.12
7.2.180.0030.00914.94
7.2.170.0060.01015.10
7.2.160.0100.00714.96
7.2.150.0090.00916.86
7.2.140.0030.01016.87
7.2.130.0050.01016.77
7.2.120.0140.00816.51
7.2.110.0120.00616.59
7.2.100.0090.01116.87
7.2.90.0240.00916.69
7.2.80.0100.01316.61
7.2.70.0260.00916.81
7.2.60.0120.00616.56
7.2.50.0140.01016.69
7.2.40.0150.00316.63
7.2.30.0150.01116.93
7.2.20.0070.01116.68
7.2.10.0110.01116.66
7.2.00.0220.00717.64
7.1.330.0100.00715.51
7.1.320.0090.00616.02
7.1.310.0040.00815.75
7.1.300.0000.01515.75
7.1.290.0070.00715.49
7.1.280.0080.00615.97
7.1.270.0090.00015.81
7.1.260.0030.01015.61
7.1.250.0070.00915.50
7.1.100.0000.01417.82
7.1.70.0050.00217.14
7.1.60.0000.01717.22
7.1.50.0070.01416.95
7.1.00.0000.06322.31
7.0.200.0040.00416.83
7.0.140.0000.07322.10
7.0.100.0170.07719.98
7.0.90.0030.07319.89
7.0.80.0100.08019.93
7.0.70.0370.03719.99
7.0.60.0030.08719.86
7.0.50.0270.08020.35
7.0.40.0230.06320.19
7.0.30.0030.08320.11
7.0.20.0170.04720.00
7.0.10.0070.08720.09
7.0.00.0130.05720.13
5.6.280.0070.06720.87
5.6.250.0170.06020.76
5.6.240.0070.04320.59
5.6.230.0070.05320.62
5.6.220.0070.04720.63
5.6.210.0030.07320.59
5.6.200.0070.08321.05
5.6.190.0070.09021.06
5.6.180.0100.07721.03
5.6.170.0070.08021.15
5.6.160.0070.06721.10
5.6.150.0230.06320.95
5.6.140.0130.04321.02
5.6.130.0130.07721.03
5.6.120.0070.08321.05
5.6.110.0070.08721.08
5.6.100.0100.08021.09
5.6.90.0100.06721.00
5.6.80.0200.04720.45
5.6.70.0070.04720.52
5.6.60.0130.07320.40
5.6.50.0070.04720.45
5.6.40.0030.05020.48
5.6.30.0030.04720.43
5.6.20.0030.03720.32
5.6.10.0030.04020.53
5.6.00.0030.05020.39
5.5.380.0070.07720.38
5.5.370.0130.06320.38
5.5.360.0030.08320.55
5.5.350.0030.07720.43
5.5.340.0170.07320.92
5.5.330.0170.07020.88
5.5.320.0070.06320.77
5.5.310.0170.07020.79
5.5.300.0070.08020.90
5.5.290.0130.06020.77
5.5.280.0030.07020.79
5.5.270.0130.08020.79
5.5.260.0200.06320.64
5.5.250.0100.08020.59
5.5.240.0070.07320.12
5.5.230.0070.05020.23
5.5.220.0030.06720.22
5.5.210.0070.07720.25
5.5.200.0100.04720.25
5.5.190.0070.03720.23
5.5.180.0000.04320.27
5.5.160.0000.04320.23
5.5.150.0030.04019.96
5.5.140.0070.03320.14
5.5.130.0070.05320.24
5.5.120.0100.03320.29
5.5.110.0070.03320.09
5.5.100.0100.03720.13
5.5.90.0000.04020.17
5.5.80.0030.06320.14
5.5.70.0100.03020.01
5.5.60.0000.04020.07
5.5.50.0000.04320.07
5.5.40.0070.04020.01
5.5.30.0070.04020.04
5.5.20.0030.04020.10
5.5.10.0030.03720.05
5.5.00.0030.04020.08
5.4.450.0100.07719.56
5.4.440.0130.04319.36
5.4.430.0070.07319.36
5.4.420.0070.08319.20
5.4.410.0030.07719.24
5.4.400.0100.07318.88
5.4.390.0030.07019.05
5.4.380.0070.08019.10
5.4.370.0170.06319.21
5.4.360.0070.03719.04
5.4.350.0030.03719.09
5.4.340.0030.04019.13
5.4.320.0030.03719.00
5.4.310.0000.04019.13
5.4.300.0000.04019.13
5.4.290.0000.04019.16
5.4.280.0070.03719.16
5.4.270.0000.03719.21
5.4.260.0070.04019.16
5.4.250.0030.04019.09
5.4.240.0000.04018.90
5.4.230.0030.03318.95
5.4.220.0030.04019.12
5.4.210.0000.04719.13
5.4.200.0000.04018.90
5.4.190.0070.03318.94
5.4.180.0030.04019.03
5.4.170.0100.04319.12
5.4.160.0070.03319.12
5.4.150.0100.03318.89
5.4.140.0030.04016.39
5.4.130.0030.03316.51
5.4.120.0030.03716.33
5.4.110.0000.04016.39
5.4.100.0130.02716.51
5.4.90.0000.04016.48
5.4.80.0000.04016.47
5.4.70.0030.03316.46
5.4.60.0030.03716.41
5.4.50.0000.03716.44
5.4.40.0130.02316.50
5.4.30.0030.05716.44
5.4.20.0070.06316.41
5.4.10.0030.06716.39
5.4.00.0070.03015.86
5.3.290.0030.04314.61
5.3.280.0100.03314.59
5.3.270.0030.03714.63
5.3.260.0100.03714.61
5.3.250.0030.03714.61
5.3.240.0030.03714.56
5.3.230.0030.05014.74
5.3.220.0030.03714.51
5.3.210.0000.05014.57
5.3.200.0000.04014.70
5.3.190.0000.06714.69
5.3.180.0030.03714.70
5.3.170.0070.03014.72
5.3.160.0100.03014.61
5.3.150.0030.03714.54
5.3.140.0100.03014.55
5.3.130.0130.05314.70
5.3.120.0070.03714.69
5.3.110.0170.06014.70
5.3.100.0030.03714.12
5.3.90.0070.07013.99
5.3.80.0000.04314.05
5.3.70.0070.07314.13
5.3.60.0070.07014.01
5.3.50.0070.07014.07
5.3.40.0100.04713.99
5.3.30.0130.06314.06
5.3.20.0070.05313.69
5.3.10.0000.08013.73
5.3.00.0100.08013.67
5.2.170.0100.05311.15
5.2.160.0070.05011.21
5.2.150.0070.06311.16
5.2.140.0030.06311.02
5.2.130.0030.05311.12
5.2.120.0030.05311.21
5.2.110.0070.06011.25
5.2.100.0100.05011.04
5.2.90.0030.05311.18
5.2.80.0030.06711.14
5.2.70.0000.06710.98
5.2.60.0030.07311.09
5.2.50.0100.05711.09
5.2.40.0100.02710.93
5.2.30.0070.06011.09
5.2.20.0070.06310.98
5.2.10.0100.04710.98
5.2.00.0070.05710.84
5.1.60.0030.02710.07
5.1.50.0070.04010.04
5.1.40.0030.03010.09
5.1.30.0030.05710.21
5.1.20.0100.04310.39
5.1.10.0030.05310.09
5.1.00.0030.0579.94
5.0.50.0070.0408.65
5.0.40.0070.0408.50
5.0.30.0000.0338.36
5.0.20.0070.0378.35
5.0.10.0100.0308.19
5.0.00.0030.0438.17
4.4.90.0000.0377.86
4.4.80.0030.0207.86
4.4.70.0000.0337.86
4.4.60.0000.0377.86
4.4.50.0000.0237.86
4.4.40.0070.0207.86
4.4.30.0000.0407.86
4.4.20.0000.0207.86
4.4.10.0030.0337.86
4.4.00.0000.0537.86
4.3.110.0000.0337.86
4.3.100.0070.0277.86
4.3.90.0070.0307.86
4.3.80.0000.0577.86
4.3.70.0030.0337.86
4.3.60.0000.0377.86
4.3.50.0070.0207.86
4.3.40.0000.0437.86
4.3.30.0030.0177.86
4.3.20.0000.0177.86
4.3.10.0030.0277.86
4.3.00.0000.0337.86

preferences:
94.66 ms | 401 KiB | 5 Q