3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a implements \Serializable { /** @var b */ private $b; /** @var */ private $v; public function __construct($v, b $b) { $this->b = $b; $this->v = $v; } /** * {@inheritdoc} */ public function serialize() { return serialize([$this->v, $this->b]); } /** * {@inheritdoc} */ public function unserialize($serialized) { list($this->v, $this->b) = unserialize($serialized); } /** * @return b */ public function getB() { return $this->b; } } class b { private $b; public function __construct($b) { $this->b = $b; } } $b = new b('test'); $t = serialize([['field1' => new a(1, $b), 'field2' => new a(2, $b)]]); $t = serialize([1, $t]); list($sss, $uns) = unserialize($t); $uns = unserialize($uns); var_dump($uns); var_dump($uns[0]['field1']->getB() === $uns[0]['field2']->getB());

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.00916.75
8.3.50.0100.01021.20
8.3.40.0070.01018.96
8.3.30.0070.00718.80
8.3.20.0040.00420.16
8.3.10.0040.00423.65
8.3.00.0040.00417.93
8.2.180.0090.00618.02
8.2.170.0180.00022.96
8.2.160.0080.00620.44
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0060.00326.16
8.2.120.0030.00617.63
8.2.110.0030.00720.46
8.2.100.0070.00417.97
8.2.90.0030.00917.75
8.2.80.0040.00417.97
8.2.70.0050.00317.93
8.2.60.0050.00318.16
8.2.50.0000.00818.10
8.2.40.0040.00419.38
8.2.30.0030.00619.26
8.2.20.0000.00817.78
8.2.10.0000.00818.11
8.2.00.0040.00418.02
8.1.280.0160.00025.92
8.1.270.0060.01323.64
8.1.260.0060.00326.35
8.1.250.0000.00828.09
8.1.240.0030.00622.59
8.1.230.0090.00319.15
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0040.00717.23
8.1.190.0000.00917.35
8.1.180.0000.00818.10
8.1.170.0080.00018.59
8.1.160.0000.00718.91
8.1.150.0000.00718.66
8.1.140.0050.00319.77
8.1.130.0070.00017.73
8.1.120.0070.00017.39
8.1.110.0050.00317.43
8.1.100.0030.00517.55
8.1.90.0040.00417.45
8.1.80.0000.00717.35
8.1.70.0050.00217.44
8.1.60.0040.00417.54
8.1.50.0060.00617.43
8.1.40.0030.00617.46
8.1.30.0000.00817.69
8.1.20.0000.00817.68
8.1.10.0040.00417.46
8.1.00.0000.00817.55
8.0.300.0030.00519.70
8.0.290.0030.00616.63
8.0.280.0030.00318.52
8.0.270.0030.00317.30
8.0.260.0060.00017.39
8.0.250.0060.00316.94
8.0.240.0040.00417.00
8.0.230.0070.00017.03
8.0.220.0040.00416.86
8.0.210.0000.00716.86
8.0.200.0030.00517.05
8.0.190.0080.00017.02
8.0.180.0030.00617.00
8.0.170.0000.00717.05
8.0.160.0000.00716.99
8.0.150.0040.00416.95
8.0.140.0070.00016.85
8.0.130.0060.00013.35
8.0.120.0000.00817.00
8.0.110.0000.00716.81
8.0.100.0000.00716.81
8.0.90.0040.00416.81
8.0.80.0080.00716.92
8.0.70.0040.00416.89
8.0.60.0000.00716.98
8.0.50.0040.00417.03
8.0.30.0080.01317.07
8.0.20.0070.01217.40
8.0.10.0040.00417.13
8.0.00.0070.01216.86
7.4.330.0050.00015.08
7.4.320.0030.00316.54
7.4.300.0030.00316.53
7.4.290.0030.00316.54
7.4.280.0050.00316.64
7.4.270.0000.01016.55
7.4.260.0000.00716.52
7.4.250.0000.00716.50
7.4.240.0010.00616.60
7.4.230.0000.00716.70
7.4.220.0150.00316.55
7.4.210.0090.00616.50
7.4.200.0030.00416.62
7.4.160.0100.01016.76
7.4.150.0160.00317.40
7.4.140.0060.01117.86
7.4.130.0110.00816.57
7.4.120.0100.00816.45
7.4.110.0090.00916.56
7.4.100.0090.00916.56
7.4.90.0070.01016.66
7.4.80.0110.00619.39
7.4.70.0100.01016.61
7.4.60.0140.00316.74
7.4.50.0080.00016.55
7.4.40.0140.00416.48
7.4.30.0070.01016.43
7.4.00.0090.00615.15
7.3.330.0000.00513.43
7.3.320.0000.00513.47
7.3.310.0070.00016.43
7.3.300.0030.00316.40
7.3.290.0110.00416.39
7.3.280.0070.01016.37
7.3.270.0100.01017.40
7.3.260.0070.01116.58
7.3.240.0080.01116.35
7.3.230.0030.01516.60
7.3.210.0070.01616.48
7.3.200.0110.01116.30
7.3.190.0110.00516.50
7.3.180.0040.01216.28
7.3.170.0120.00316.47
7.3.160.0090.01216.52
7.3.10.0030.01416.59
7.3.00.0060.00616.75
7.2.330.0140.00616.39
7.2.320.0440.01716.54
7.2.310.0060.01116.51
7.2.300.0130.01016.58
7.2.290.0090.01316.87
7.2.130.0000.01017.02
7.2.120.0040.01117.06
7.2.110.0030.00916.85
7.2.100.0060.00616.84
7.2.90.0050.00816.88
7.2.80.0060.00916.57
7.2.70.0030.00917.08
7.2.60.0050.01016.93
7.2.50.0030.00616.61
7.2.40.0000.01517.03
7.2.30.0030.01417.09
7.2.20.0060.01016.91
7.2.10.0120.00316.89
7.2.00.0100.00718.13
7.1.250.0030.01015.79
7.1.200.0120.00615.17
7.1.100.0100.00718.19
7.1.70.0050.00317.20
7.1.60.0090.00619.50
7.1.50.0070.01717.14
7.1.00.0030.07322.41
7.0.200.0270.00015.04
7.0.60.0070.06320.03
7.0.50.0030.07317.88
7.0.40.0100.09019.96
7.0.30.0130.04720.30
7.0.20.0230.07320.23
7.0.10.0070.07020.07
7.0.00.0070.04720.26
5.6.280.0030.03321.13
5.6.210.0030.08320.70
5.6.200.0130.05718.25
5.6.190.0070.08020.39
5.6.180.0300.06020.48
5.6.170.0200.03720.34
5.6.160.0030.08720.43
5.6.150.0070.08018.16
5.6.140.0000.08718.21
5.6.130.0130.07718.16
5.6.120.0070.04720.93
5.6.110.0070.06321.04
5.6.100.0100.08021.12
5.6.90.0000.09721.01
5.6.80.0170.07320.39
5.5.350.0030.08320.44
5.5.340.0030.09018.08
5.5.330.0070.05720.26
5.5.320.3070.05020.28
5.5.310.0230.08020.34
5.5.300.0070.04017.98
5.5.290.0030.04017.95
5.5.280.0100.04020.80
5.5.270.0130.07720.87
5.5.260.0100.08020.88
5.5.250.0070.06020.59
5.5.240.0070.07320.27
5.4.450.0800.06719.31
5.4.440.0830.06019.16
5.4.430.0870.06319.57
5.4.420.0900.05719.58
5.4.410.1170.06019.05
5.4.400.0900.07018.87
5.4.390.0830.05718.99
5.4.380.0900.05019.15
5.4.370.0800.05719.14
5.4.360.0870.07719.29
5.4.350.0830.05719.31
5.4.340.0930.04019.39
5.4.320.0730.07019.05
5.4.310.0830.05319.26
5.4.300.0730.05719.28
5.4.290.0830.04719.16
5.4.280.0970.05718.84
5.4.270.0700.05719.15
5.4.260.0970.06318.84
5.4.250.0830.05719.15
5.4.240.0770.05018.96
5.4.230.0870.04318.86
5.4.220.0830.05019.20
5.4.210.0800.06719.16
5.4.200.0730.05719.25
5.4.190.0800.05319.25
5.4.180.0800.05019.15
5.4.170.0730.06019.14
5.4.160.0700.07018.85
5.4.150.0700.06318.98
5.4.140.0730.05716.63
5.4.130.0870.05016.50
5.4.120.0870.05016.53
5.4.110.0830.05316.58
5.4.100.0800.05716.58
5.4.90.1000.04316.66
5.4.80.0800.05016.61
5.4.70.0370.06016.23
5.4.60.0030.06716.52
5.4.50.0070.07016.54
5.4.40.0370.05716.55
5.4.30.0230.06716.37
5.4.20.0000.03316.43

preferences:
52.35 ms | 401 KiB | 5 Q