3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo implements \Serializable { public $default = 10; public $setMe; private $test = 1; public $removeOnSerialize = 'blah'; public function serialize() { unset($this->removeOnSerialze); return serialize($this->getData()); } public function unserialize($serialized) { foreach (unserialize($serialized) as $key => $value) { $this->$key = $value; } $this->removeOnSerialize = 'Set some value'; } protected function getData() { return (array)$this; } } $obj = new Foo(); $obj->setMe = 9999; print_r($obj); // here I have all as exepcted $serialized = serialize($obj); $unserialized = unserialize($serialized); print_r($unserialized);

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.90.0150.00026.77
8.3.80.0060.00319.36
8.3.70.0150.00016.88
8.3.60.0120.00316.63
8.3.50.0180.01122.91
8.3.40.0090.00618.71
8.3.30.0110.00318.94
8.3.20.0000.00721.73
8.3.10.0000.00821.91
8.3.00.0050.00319.79
8.2.210.0120.00626.77
8.2.200.0000.00918.88
8.2.190.0060.01016.84
8.2.180.0140.00718.34
8.2.170.0090.01222.96
8.2.160.0140.00321.00
8.2.150.0080.00024.18
8.2.140.0050.00224.66
8.2.130.0080.00026.16
8.2.120.0050.00319.70
8.2.110.0050.00520.94
8.2.100.0030.00718.09
8.2.90.0000.00819.23
8.2.80.0080.00017.97
8.2.70.0030.00717.50
8.2.60.0040.00418.04
8.2.50.0080.00418.10
8.2.40.0000.00922.32
8.2.30.0030.00519.26
8.2.20.0070.00017.64
8.2.10.0040.00418.09
8.2.00.0050.00218.18
8.1.290.0040.00830.84
8.1.280.0060.01225.92
8.1.270.0080.00023.82
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0130.00721.16
8.1.230.0040.00717.42
8.1.220.0000.00917.74
8.1.210.0030.00618.77
8.1.200.0000.01317.25
8.1.190.0030.00517.22
8.1.180.0040.00418.10
8.1.170.0000.00818.60
8.1.160.0000.00722.11
8.1.150.0060.00318.82
8.1.140.0030.00619.60
8.1.130.0000.00717.68
8.1.120.0040.00417.52
8.1.110.0040.00417.41
8.1.100.0040.00417.36
8.1.90.0000.00717.43
8.1.80.0030.00317.39
8.1.70.0030.00317.41
8.1.60.0040.00417.62
8.1.50.0000.00917.44
8.1.40.0080.00017.43
8.1.30.0060.00317.57
8.1.20.0040.00417.72
8.1.10.0040.00417.51
8.1.00.0000.00817.38
8.0.300.0050.00318.77
8.0.290.0040.00416.75
8.0.280.0000.00818.46
8.0.270.0000.00717.28
8.0.260.0030.00317.28
8.0.250.0030.00317.04
8.0.240.0000.00716.90
8.0.230.0070.00017.02
8.0.220.0030.00316.88
8.0.210.0030.00316.98
8.0.200.0060.00017.04
8.0.190.0000.00816.97
8.0.180.0050.00316.98
8.0.170.0000.00817.04
8.0.160.0000.00716.96
8.0.150.0000.00816.90
8.0.140.0030.00416.85
8.0.130.0000.00813.40
8.0.120.0000.00816.87
8.0.110.0040.00416.92
8.0.100.0050.00216.80
8.0.90.0040.00416.93
8.0.80.0060.00916.93
8.0.70.0060.00316.79
8.0.60.0030.00516.96
8.0.50.0080.00016.85
8.0.30.0040.01617.19
8.0.20.0130.01017.40
8.0.10.0040.00416.94
8.0.00.0090.00916.77
7.4.330.0000.00515.08
7.4.320.0000.00616.57
7.4.300.0050.00316.64
7.4.290.0030.00316.64
7.4.280.0000.01016.66
7.4.270.0040.00416.48
7.4.260.0000.00716.64
7.4.250.0050.00316.60
7.4.240.0040.00416.48
7.4.230.0050.00316.72
7.4.220.0140.01416.65
7.4.210.0120.00616.60
7.4.200.0030.00416.43
7.4.160.0030.01316.64
7.4.150.0060.01317.40
7.4.140.0100.00817.86
7.4.130.0130.00816.58
7.4.120.0100.00716.54
7.4.110.0090.00816.68
7.4.100.0150.00716.47
7.4.90.0040.01516.64
7.4.80.0090.00619.39
7.4.70.0150.00916.75
7.4.60.0120.01016.46
7.4.50.0030.00616.46
7.4.40.0150.00316.44
7.4.30.0100.01416.46
7.4.00.0050.00815.19
7.3.330.0000.00713.42
7.3.320.0000.00513.30
7.3.310.0070.00016.42
7.3.300.0030.00316.46
7.3.290.0050.00916.47
7.3.280.0100.00816.47
7.3.270.0040.01517.40
7.3.260.0060.01316.78
7.3.250.0110.00716.51
7.3.240.0140.00316.54
7.3.230.0190.00016.44
7.3.210.0070.01116.36
7.3.200.0030.01416.47
7.3.190.0060.01016.41
7.3.180.0160.00616.70
7.3.170.0000.01616.68
7.3.160.0040.01116.71
7.3.120.0130.00315.04
7.3.110.0040.01415.18
7.3.100.0090.00314.88
7.3.90.0030.00814.87
7.3.80.0070.00314.97
7.3.70.0000.01214.54
7.3.60.0120.00315.02
7.3.50.0000.01414.93
7.3.40.0100.00714.83
7.3.30.0110.00714.64
7.3.20.0090.00316.71
7.3.10.0080.00416.77
7.3.00.0130.00316.79
7.2.330.0170.00316.73
7.2.320.0100.00616.79
7.2.310.0060.01116.75
7.2.300.0080.00816.68
7.2.290.0110.00616.54
7.2.250.0060.01215.30
7.2.240.0060.01315.02
7.2.230.0030.01315.05
7.2.220.0070.00714.92
7.2.210.0100.00615.20
7.2.200.0070.00715.16
7.2.190.0130.00314.94
7.2.180.0040.01015.16
7.2.170.0040.01215.25
7.2.60.0080.00317.04
7.2.00.0060.00619.21
7.1.330.0060.00915.73
7.1.320.0070.00715.69
7.1.310.0030.00916.05
7.1.300.0040.00815.50
7.1.290.0070.00615.68
7.1.280.0060.00915.90
7.1.270.0100.00715.63
7.1.260.0030.00615.95
7.1.200.0060.00615.88
7.1.70.0000.00917.29
7.1.60.0030.01015.39
7.1.50.0100.00717.01
7.1.00.0100.07322.47
7.0.200.0000.01616.54
7.0.90.0170.07320.06
7.0.80.0200.06020.01
7.0.70.0230.05320.02
7.0.60.0200.06020.10
7.0.50.0030.07020.31
7.0.40.0030.06720.39
7.0.30.0100.06720.35
7.0.20.0200.07020.24
7.0.10.0270.07020.40
7.0.00.0170.08720.37
5.6.240.0230.06320.83
5.6.230.0200.08320.77
5.6.220.0200.08320.60
5.6.210.0100.08020.86
5.6.200.0130.06321.03
5.6.190.0070.06721.09
5.6.180.0200.04721.16
5.6.170.0130.06021.08
5.6.160.0230.05321.07
5.6.150.0100.09321.18
5.6.140.0200.06021.03
5.6.130.0270.04721.14
5.6.120.0170.05721.07
5.6.110.0230.06721.08
5.6.100.0170.07021.07
5.6.90.0000.07021.08
5.6.80.0170.05720.41
5.6.70.0100.05720.45
5.6.60.0230.04320.53
5.6.50.0100.06020.53
5.6.40.0100.08020.45
5.6.30.0200.07320.46
5.6.20.0100.07020.45
5.6.10.0230.06720.45
5.6.00.0130.08020.37

preferences:
32.98 ms | 401 KiB | 5 Q