3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { private $a; private $b; public function __construct($a) { $this->a = $a; $this->b = $a; } public function __sleep() { return array('a'); } public function __wakeUp() { $this->__construct($this->a); } public function getA() { return $this->a; } public function getB() { return $this->b; } } class B implements \Serializable { private $a; private $b; public function __construct($a) { $this->a = $a; $this->b = $a; } public function serialize() { return serialize(array($this->a)); } public function unserialize($serialized) { list($this->a) = unserialize($serialized); $this->__construct($this->a); } public function getA() { return $this->a; } public function getB() { return $this->b; } } $a = new A('a'); $b = new B('b'); $serializedA = serialize($a); $serializedB = serialize($b); var_dump($serializedA); var_dump($serializedB);

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.00316.88
8.3.50.0130.00618.23
8.3.40.0090.01218.92
8.3.30.0140.00018.66
8.3.20.0050.00318.73
8.3.10.0090.00020.46
8.3.00.0030.00617.50
8.2.180.0100.01016.75
8.2.170.0070.01422.96
8.2.160.0070.01022.31
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0030.00526.16
8.2.120.0000.00819.89
8.2.110.0030.00620.96
8.2.100.0030.00917.84
8.2.90.0060.00319.17
8.2.80.0040.00418.05
8.2.70.0080.00017.50
8.2.60.0050.00317.93
8.2.50.0040.00418.07
8.2.40.0000.00718.22
8.2.30.0040.00418.07
8.2.20.0000.00717.72
8.2.10.0050.00317.61
8.2.00.0040.00417.64
8.1.280.0070.00725.92
8.1.270.0080.00024.66
8.1.260.0030.00626.35
8.1.250.0070.00028.09
8.1.240.0080.00022.48
8.1.230.0080.00320.79
8.1.220.0000.00817.74
8.1.210.0030.00518.89
8.1.200.0080.00317.23
8.1.190.0040.00417.53
8.1.180.0050.00318.10
8.1.170.0040.00418.84
8.1.160.0040.00418.89
8.1.150.0040.00418.68
8.1.140.0000.00917.49
8.1.130.0030.00317.73
8.1.120.0000.00717.53
8.1.110.0000.00717.41
8.1.100.0040.00417.47
8.1.90.0040.00417.45
8.1.80.0080.00017.48
8.1.70.0030.00317.39
8.1.60.0060.00317.52
8.1.50.0050.00317.49
8.1.40.0040.00417.55
8.1.30.0030.00617.60
8.1.20.0040.00417.68
8.1.10.0000.00817.48
8.1.00.0030.00517.42
8.0.300.0040.00420.04
8.0.290.0040.00416.75
8.0.280.0040.00418.36
8.0.270.0070.00017.14
8.0.260.0030.00316.89
8.0.250.0040.00416.96
8.0.240.0030.00616.98
8.0.230.0000.00716.91
8.0.220.0070.00016.86
8.0.210.0040.00416.88
8.0.200.0070.00016.97
8.0.190.0080.00017.00
8.0.180.0000.00716.87
8.0.170.0080.00016.94
8.0.160.0050.00316.81
8.0.150.0030.00616.83
8.0.140.0000.01216.89
8.0.130.0000.00713.33
8.0.120.0070.00016.86
8.0.110.0040.00416.87
8.0.100.0070.00016.93
8.0.90.0050.00316.71
8.0.80.0140.00016.84
8.0.70.0000.00716.83
8.0.60.0040.00416.87
8.0.50.0000.00816.77
8.0.30.0100.00917.12
8.0.20.0090.01017.05
8.0.10.0000.00716.91
8.0.00.0150.00516.81
7.4.330.0000.00512.99
7.4.320.0060.00016.61
7.4.300.0000.00616.61
7.4.290.0030.00316.40
7.4.280.0000.00816.40
7.4.270.0000.00716.65
7.4.260.0060.00013.30
7.4.250.0080.00016.41
7.4.240.0050.00216.54
7.4.230.0040.00416.48
7.4.220.0130.01016.44
7.4.210.0130.00716.49
7.4.200.0070.00016.58
7.4.190.0000.00716.76
7.4.160.0120.00316.54
7.4.150.0030.01516.52
7.4.140.0060.01116.44
7.4.130.0080.01216.57
7.4.120.0080.00916.58
7.4.110.0100.00616.48
7.4.100.0100.00716.53
7.4.90.0150.00316.44
7.4.80.0130.00316.59
7.4.70.0090.01116.49
7.4.60.0040.01716.49
7.4.50.0040.00416.43
7.4.40.0040.00716.39
7.4.30.0160.00016.68
7.4.00.0070.01015.20
7.3.330.0030.00313.28
7.3.320.0030.00213.27
7.3.310.0030.00316.25
7.3.300.0040.00416.28
7.3.290.0060.00916.31
7.3.280.0090.00816.28
7.3.270.0100.01016.32
7.3.260.0170.00316.30
7.3.250.0070.01416.44
7.3.240.0110.01416.30
7.3.230.0080.00816.22
7.3.210.0100.00716.36
7.3.200.0100.01319.39
7.3.190.0070.01016.31
7.3.180.0110.00516.26
7.3.170.0120.00416.31
7.3.160.0160.00716.27
7.3.120.0030.01314.87
7.2.330.0060.01316.41
7.2.320.0110.01016.70
7.2.310.0120.00616.82
7.2.300.0060.00916.74
7.2.290.0100.00816.51
7.2.60.0090.00916.94
7.2.50.0030.01017.11
7.2.00.0070.01119.51
7.1.200.0070.00715.70
7.1.100.0080.00518.32
7.1.70.0050.00516.98
7.1.60.0100.01319.40
7.1.50.0040.00716.58
7.1.00.0000.07022.33
7.0.200.0250.00314.57
7.0.140.0070.07322.08
7.0.120.0070.06722.18
7.0.60.0170.03019.92
7.0.50.0070.08317.98
7.0.40.0300.08320.09
7.0.30.0230.04320.16
7.0.20.0370.06320.15
7.0.10.0200.06320.25
7.0.00.0270.08720.23
5.6.280.0030.07320.92
5.6.210.0030.08720.77
5.6.200.0030.08318.23
5.6.190.0130.09020.48
5.6.180.0270.08020.48
5.6.170.0230.04720.63
5.6.160.0400.05720.49
5.6.150.0300.07020.34
5.6.140.0270.05020.50
5.6.130.0200.04720.17
5.6.120.0270.06320.44
5.6.110.0170.04320.24
5.6.100.0170.05720.33
5.6.90.0230.08020.22
5.6.80.0200.08319.76
5.6.70.0170.04719.66
5.6.60.0070.05719.73
5.6.50.0230.04019.58
5.6.40.0270.05319.77
5.6.30.0130.06719.74
5.6.20.0130.05719.70
5.6.10.0170.05719.70
5.6.00.0330.04719.61
5.5.350.0030.08320.45
5.5.340.0100.08017.95
5.5.330.0270.08020.47
5.5.320.0270.07720.33
5.5.310.0200.05020.44
5.5.300.0230.04719.98
5.5.290.0300.07320.30
5.5.280.0230.05020.21
5.5.270.0230.05320.00
5.5.260.0230.06320.11
5.5.250.0270.07320.01
5.5.240.0300.06719.51
5.5.230.0230.08019.55
5.5.220.0200.04019.41
5.5.210.0230.08019.56
5.5.200.0300.05019.47
5.5.190.0200.04719.46
5.5.180.0270.04319.57
5.5.160.0230.04719.32
5.5.150.0230.05019.43
5.5.140.0270.08019.34
5.5.130.0230.07319.66
5.5.120.0270.07019.67
5.5.110.0170.05719.38
5.5.100.0270.03719.29
5.5.90.0330.07019.22
5.5.80.0230.07319.48
5.5.70.0170.05019.22
5.5.60.0200.07019.20
5.5.50.0330.06319.27
5.5.40.0230.07319.44
5.5.30.0100.05719.46
5.5.20.0300.05019.30
5.5.10.0230.05019.42
5.5.00.0270.07319.26
5.4.450.0300.05719.19
5.4.440.0270.07719.18
5.4.430.0200.05719.56
5.4.420.0200.05719.41
5.4.410.0200.04319.34
5.4.400.0130.05319.16
5.4.390.0230.04718.88
5.4.380.0230.04719.15
5.4.370.0270.07718.93
5.4.360.0270.04019.05
5.4.350.0270.05019.25
5.4.340.0300.06719.25
5.4.320.0200.05718.85
5.4.310.0270.07018.88
5.4.300.0300.06719.14
5.4.290.0200.07719.11
5.4.280.0330.06719.25
5.4.270.0170.04719.15
5.4.260.0200.04319.24
5.4.250.0200.05018.91
5.4.240.0270.06719.20
5.4.230.0200.06719.12
5.4.220.0170.06319.26
5.4.210.0200.07318.84
5.4.200.0170.06018.98
5.4.190.0330.06319.15
5.4.180.0200.03719.14
5.4.170.0170.05318.91
5.4.160.0200.04719.13
5.4.150.0200.07319.13
5.4.140.0330.06316.39
5.4.130.0300.05716.29
5.4.120.0270.06316.45
5.4.110.0330.05016.34
5.4.100.0300.05716.50
5.4.90.0230.05316.29
5.4.80.0270.03316.42
5.4.70.0230.06316.27
5.4.60.0230.06716.36
5.4.50.0200.03716.52
5.4.40.0130.04016.43
5.4.30.0130.04016.26
5.4.20.0170.04716.38
5.4.10.0200.07016.38
5.4.00.0230.03015.82
5.3.290.0130.06014.75
5.3.280.0330.06014.67
5.3.270.0270.05014.63
5.3.260.0300.06714.66
5.3.250.0270.07014.69
5.3.240.0200.08014.63
5.3.230.0270.07014.78
5.3.220.0330.06314.74
5.3.210.0230.06314.50
5.3.200.0430.03314.47
5.3.190.0170.08014.59
5.3.180.0300.07014.60
5.3.170.0270.07314.61
5.3.160.0300.03314.63
5.3.150.0200.03314.73
5.3.140.0170.04014.57
5.3.130.0270.05714.57
5.3.120.0200.05314.61
5.3.110.0200.08014.59
5.3.100.0330.05314.22
5.3.90.0200.07713.96
5.3.80.0170.06313.98
5.3.70.0130.04014.04
5.3.60.0200.03013.98
5.3.50.0170.03313.99
5.3.40.0200.03013.99
5.3.30.0170.03713.94
5.3.20.0100.04313.78
5.3.10.0130.03713.59
5.3.00.0170.03313.81
5.2.170.0100.03712.63
5.2.160.0200.02712.63
5.2.150.0100.03012.63
5.2.140.0100.03012.63
5.2.130.0100.03012.63
5.2.120.0100.03012.63
5.2.110.0170.02712.63
5.2.100.0170.02712.63
5.2.90.0100.03312.63
5.2.80.0130.02712.63
5.2.70.0130.04712.63
5.2.60.0100.03012.63
5.2.50.0070.03312.63
5.2.40.0100.02712.63
5.2.30.0100.02712.63
5.2.20.0200.04712.63
5.2.10.0100.05712.63
5.2.00.0170.02012.63
5.1.60.0170.04012.63
5.1.50.0100.03012.63
5.1.40.0130.03012.63
5.1.30.0100.02312.63
5.1.20.0070.03012.63
5.1.10.0100.02712.63
5.1.00.0070.02712.63
5.0.50.0070.02012.63
5.0.40.0030.02012.63
5.0.30.0030.03012.63
5.0.20.0030.02012.63
5.0.10.0070.01712.63
5.0.00.0030.03012.63
4.4.90.0070.01712.63
4.4.80.0000.01712.63
4.4.70.0030.02312.63
4.4.60.0070.01312.63
4.4.50.0070.01312.63
4.4.40.0070.04012.63
4.4.30.0070.01312.63
4.4.20.0030.02012.63
4.4.10.0030.01712.63
4.4.00.0070.02312.63
4.3.110.0030.01712.63
4.3.100.0030.01712.63
4.3.90.0030.01312.63
4.3.80.0000.03312.63
4.3.70.0030.01312.63
4.3.60.0000.01712.63
4.3.50.0070.01312.63
4.3.40.0070.02312.63
4.3.30.0000.01712.63
4.3.20.0030.01312.63
4.3.10.0000.01712.63
4.3.00.0030.01312.63

preferences:
38.59 ms | 401 KiB | 5 Q