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 { private $obj; public function __construct($obj) { $this->obj = $obj; } public function getObject() { return $this->obj; } public function serialize() { for ($i = 0; $i < 10; ++$i) { var_dump(serialize(new \stdClass())); } return serialize($this->obj); } public function unserialize($serialized) { $this->obj = unserialize($serialized); } } $wrapper = new WrapperObject(new ObjectWithReferences()); var_dump($wrapper->getObject()); $serialized = serialize($wrapper); var_dump($serialized); $wrapper = unserialize($serialized);

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.0000.01517.00
8.3.60.0040.01118.68
8.3.50.0130.00921.27
8.3.40.0080.00818.71
8.3.30.0110.00418.85
8.3.20.0000.00720.29
8.3.10.0060.00321.95
8.3.00.0080.00017.93
8.2.180.0140.00716.63
8.2.170.0120.00322.96
8.2.160.0170.00320.52
8.2.150.0090.00024.18
8.2.140.0190.00024.66
8.2.130.0120.00326.16
8.2.120.0040.00417.75
8.2.110.0120.01220.90
8.2.100.0070.00317.84
8.2.90.0000.00817.63
8.2.80.0060.00319.23
8.2.70.0040.00417.80
8.2.60.0030.00617.93
8.2.50.0000.00818.10
8.2.40.0090.00020.57
8.2.30.0040.00420.54
8.2.20.0030.00517.72
8.2.10.0040.00418.07
8.2.00.0050.00318.16
8.1.280.0000.01525.92
8.1.270.0080.01122.15
8.1.260.0030.00726.35
8.1.250.0040.00428.09
8.1.240.0060.00322.19
8.1.230.0040.00719.01
8.1.220.0030.00517.74
8.1.210.0000.00818.77
8.1.200.0030.00617.35
8.1.190.0000.00817.36
8.1.180.0000.00818.10
8.1.170.0040.00418.45
8.1.160.0000.00722.02
8.1.150.0040.00418.84
8.1.140.0040.00417.55
8.1.130.0090.00017.66
8.1.120.0020.00517.58
8.1.110.0000.00717.50
8.1.100.0040.00417.46
8.1.90.0000.00717.40
8.1.80.0040.00417.37
8.1.70.0000.00717.39
8.1.60.0040.00417.60
8.1.50.0040.00417.49
8.1.40.0000.00817.58
8.1.30.0030.00517.68
8.1.20.0000.00817.60
8.1.10.0040.00417.49
8.1.00.0040.00417.38
8.0.300.0070.00019.77
8.0.290.0000.00817.00
8.0.280.0070.00018.49
8.0.270.0000.00717.18
8.0.260.0000.00717.34
8.0.250.0040.00417.09
8.0.240.0030.00317.01
8.0.230.0060.00317.02
8.0.220.0000.00717.05
8.0.210.0050.00316.91
8.0.200.0000.00617.12
8.0.190.0040.00417.07
8.0.180.0040.00416.93
8.0.170.0080.00017.08
8.0.160.0000.00716.88
8.0.150.0030.00316.83
8.0.140.0000.00716.86
8.0.130.0060.00013.45
8.0.120.0090.00016.85
8.0.110.0000.00717.03
8.0.100.0040.00417.02
8.0.90.0040.00416.85
8.0.80.0060.01617.00
8.0.70.0050.00316.87
8.0.60.0000.00716.90
8.0.50.0040.00416.84
8.0.30.0070.01217.07
8.0.20.0060.01317.40
8.0.10.0000.00717.13
8.0.00.0110.01116.84
7.4.330.0030.00315.09
7.4.320.0030.00316.46
7.4.300.0070.00016.53
7.4.290.0070.00016.60
7.4.280.0030.00316.39
7.4.270.0040.00416.69
7.4.260.0000.00816.56
7.4.250.0050.00316.67
7.4.240.0030.00316.52
7.4.230.0040.00416.62
7.4.220.0060.01116.49
7.4.210.0060.00816.56
7.4.200.0070.00016.70
7.4.160.0100.00716.92
7.4.150.0070.01117.40
7.4.140.0100.01117.86
7.4.130.0120.00716.65
7.4.120.0110.00816.67
7.4.110.0110.00716.68
7.4.100.0060.01316.63
7.4.90.0100.00716.53
7.4.80.0070.01019.39
7.4.70.0110.01216.62
7.4.60.0060.00916.52
7.4.50.0060.00316.21
7.4.40.0110.00716.24
7.4.30.0180.00316.50
7.4.00.0070.00715.02
7.3.330.0020.00213.36
7.3.320.0000.00613.24
7.3.310.0000.00816.25
7.3.300.0000.00716.35
7.3.290.0030.01216.37
7.3.280.0110.01016.36
7.3.270.0160.00017.40
7.3.260.0070.01116.46
7.3.250.0090.00916.49
7.3.240.0060.01216.42
7.3.230.0030.01416.48
7.3.210.0160.00316.54
7.3.200.0110.01116.41
7.3.190.0070.01016.59
7.3.180.0130.00316.60
7.3.170.0130.01016.52
7.3.160.0100.00716.63
7.2.330.0070.01016.73
7.2.320.0140.00416.61
7.2.310.0030.01316.85
7.2.300.0090.00916.83
7.2.290.0100.00716.78
7.2.60.0030.01016.61
7.2.00.0100.01019.33
7.1.200.0070.00415.85
7.1.100.0000.01118.22
7.1.70.0070.00717.18
7.1.60.0060.01619.19
7.1.50.0040.01117.05
7.1.00.0100.07022.48
7.0.200.0080.00016.49
7.0.70.4970.03019.84
7.0.60.0070.08719.94
7.0.50.0100.07717.89
7.0.40.0100.03719.95
7.0.30.0300.08320.23
7.0.20.0270.08020.12
7.0.10.0100.04720.15
7.0.00.0070.05720.05
5.6.280.0100.05720.87
5.6.210.0030.04020.56
5.6.200.0070.08318.19
5.6.190.0170.08020.47
5.6.180.0100.03320.38
5.6.170.0500.07020.54
5.6.160.0170.07020.43
5.6.150.0100.04718.18
5.6.140.0030.08318.14
5.6.130.0030.08718.14
5.6.120.0100.08721.12
5.6.110.0070.08021.00
5.6.100.0000.04321.04
5.6.90.0100.07720.96
5.6.80.0170.07020.30
5.6.70.0030.05020.53
5.5.350.0030.04720.45
5.5.340.0130.08018.04
5.5.330.0100.04020.27
5.5.320.0000.07320.22
5.5.310.0230.04320.34
5.5.300.0100.07718.05
5.5.290.0070.04718.08
5.5.280.0070.05720.82
5.5.270.0070.04020.89
5.5.260.0170.07320.78
5.5.250.0070.08020.62
5.5.240.0100.04020.37
5.4.450.1200.00019.33
5.4.440.1070.00019.68
5.4.430.1030.00019.30
5.4.420.1200.00019.62
5.4.410.1200.00019.44
5.4.400.1070.00019.14
5.4.390.1030.00019.19
5.4.380.1000.00019.11
5.4.370.1000.00019.21
5.4.360.1030.00018.85
5.4.350.1000.00019.14
5.4.340.1000.00019.24
5.4.320.1030.00019.36
5.4.310.1030.00019.21
5.4.300.1170.00019.24
5.4.290.1000.00019.21
5.4.280.1030.00018.85
5.4.270.1000.00019.00
5.4.260.1070.00019.11
5.4.250.1230.00018.86
5.4.240.1170.00019.16
5.4.230.1170.00018.98
5.4.220.1230.00019.26
5.4.210.1070.00019.11
5.4.200.1000.00018.83
5.4.190.1170.00019.14
5.4.180.1200.00018.99
5.4.170.1400.00019.11
5.4.160.1200.00019.13
5.4.150.1070.00019.15
5.4.140.1000.00016.51
5.4.130.1330.00016.52
5.4.120.1170.00016.46
5.4.110.1170.00016.51
5.4.100.1330.00016.44
5.4.90.1100.00016.53
5.4.80.0970.00016.61
5.4.70.0030.03316.39
5.4.60.0170.06016.17
5.4.50.0030.05316.54
5.4.40.0030.06316.26
5.4.30.0030.08316.26
5.4.20.0070.06316.57
5.4.10.0400.05316.43

preferences:
57.23 ms | 401 KiB | 5 Q