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', 'b'); } 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, $this->b)); } public function unserialize($serialized) { list($this->a, $this->b) = unserialize($serialized); $this->__construct($this->a); } public function getA() { return $this->a; } public function getB() { return $this->b; } } class C { private $a; private $b; public function __construct($a) { $this->a = $a; $this->b = $a; } public function getA() { return $this->a; } public function getB() { return $this->b; } } class D extends \ReflectionClass { } $a = new A('a'); $b = new B('b'); $c = new C('c'); $d = new D('stdClass'); $e = new \ReflectionClass('stdClass'); $serializedA = serialize($a); $serializedB = serialize($b); $serializedC = serialize($c); $serializedD = serialize($d); $serializedE = serialize($e); var_dump($serializedA); var_dump($serializedB); var_dump($serializedC); var_dump($serializedD); var_dump($serializedE); var_dump(unserialize($serializedE));

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.0090.00618.43
8.3.50.0210.01022.01
8.3.40.0140.00718.92
8.3.30.0140.00319.07
8.3.20.0070.00020.35
8.3.10.0090.00021.80
8.3.00.0040.00422.39
8.2.180.0070.00718.41
8.2.170.0040.01122.96
8.2.160.0070.00720.89
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0000.00726.16
8.2.120.0080.00017.75
8.2.110.0000.00922.11
8.2.100.0040.00819.70
8.2.90.0060.00319.22
8.2.80.0030.00518.16
8.2.70.0040.00417.63
8.2.60.0060.00317.93
8.2.50.0000.00818.07
8.2.40.0030.00718.34
8.2.30.0050.00318.13
8.2.20.0030.00617.75
8.2.10.0080.00017.81
8.2.00.0060.00317.88
8.1.280.0070.00725.92
8.1.270.0040.00424.02
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0080.00023.91
8.1.230.0080.00418.96
8.1.220.0050.00317.78
8.1.210.0000.00818.77
8.1.200.0050.00517.47
8.1.190.0030.00617.64
8.1.180.0060.00318.10
8.1.170.0040.00718.69
8.1.160.0050.00522.12
8.1.150.0030.00520.41
8.1.140.0040.00417.42
8.1.130.0070.00017.78
8.1.120.0000.00717.47
8.1.110.0040.00617.49
8.1.100.0030.00417.40
8.1.90.0000.00717.51
8.1.80.0000.00717.44
8.1.70.0000.00717.50
8.1.60.0030.00517.68
8.1.50.0040.00417.43
8.1.40.0050.00317.53
8.1.30.0000.00817.59
8.1.20.0000.00817.73
8.1.10.0030.00617.46
8.1.00.0000.00817.46
8.0.300.0050.00318.77
8.0.290.0040.00417.30
8.0.280.0040.00418.41
8.0.270.0000.00817.31
8.0.260.0030.00316.82
8.0.250.0070.00017.10
8.0.240.0000.00717.14
8.0.230.0000.00617.05
8.0.220.0000.00717.04
8.0.210.0030.00316.99
8.0.200.0030.00317.11
8.0.190.0030.00317.03
8.0.180.0050.00217.04
8.0.170.0040.00416.94
8.0.160.0050.00316.88
8.0.150.0000.01017.03
8.0.140.0050.00216.93
8.0.130.0000.00713.39
8.0.120.0000.00716.97
8.0.110.0040.00416.99
8.0.100.0000.00717.04
8.0.90.0000.00816.87
8.0.80.0090.01316.92
8.0.70.0050.00316.88
8.0.60.0050.00316.90
8.0.50.0000.00717.04
8.0.30.0110.01117.13
8.0.20.0120.00617.40
8.0.10.0000.00717.02
8.0.00.0130.00516.79
7.4.330.0050.00015.00
7.4.320.0000.00716.56
7.4.300.0000.00616.66
7.4.290.0070.00016.56
7.4.280.0030.00316.47
7.4.270.0030.00316.58
7.4.260.0000.00716.68
7.4.250.0040.00416.59
7.4.240.0030.00516.61
7.4.230.0070.00016.50
7.4.220.0120.00616.56
7.4.210.0090.00616.54
7.4.200.0000.00816.44
7.4.190.0000.00716.71
7.4.160.0060.01016.39
7.4.150.0090.00917.40
7.4.140.0070.01117.86
7.4.130.0100.00916.52
7.4.120.0110.00816.57
7.4.110.0180.00616.55
7.4.100.0100.00716.48
7.4.90.0160.00616.66
7.4.80.0100.00716.26
7.4.70.0110.00416.56
7.4.60.0120.00816.50
7.4.50.0000.00916.65
7.4.40.0150.00422.77
7.4.30.0060.01016.62
7.4.00.0100.00315.29
7.3.330.0030.00313.36
7.3.320.0000.00513.37
7.3.310.0040.00416.42
7.3.300.0000.00716.23
7.3.290.0000.01516.36
7.3.280.0080.01116.34
7.3.270.0190.00417.40
7.3.260.0060.01216.48
7.3.250.0120.00616.55
7.3.240.0140.01016.56
7.3.230.0130.00416.44
7.3.210.0080.00816.67
7.3.200.0030.02119.39
7.3.190.0110.00716.42
7.3.180.0130.00316.46
7.3.170.0090.00616.37
7.3.160.0080.00716.46
7.3.120.0070.01114.94
7.3.10.0130.00016.29
7.3.00.0030.01016.63
7.2.330.0080.00816.75
7.2.320.0130.00916.46
7.2.310.0150.00316.78
7.2.300.0060.01116.90
7.2.290.0130.00716.56
7.2.130.0130.00317.04
7.2.120.0040.01116.63
7.2.110.0030.01216.65
7.2.100.0000.01017.04
7.2.90.0130.00616.55
7.2.80.0060.00916.76
7.2.70.0000.01216.83
7.2.60.0040.01216.77
7.2.50.0060.00916.93
7.2.40.0090.00617.10
7.2.30.0130.00716.73
7.2.20.0140.00017.17
7.2.10.0030.00917.13
7.2.00.0050.00918.25
7.1.250.0000.01015.86
7.1.200.0060.00615.91
7.1.100.0040.01118.07
7.1.70.0030.00717.07
7.1.60.0070.01719.82
7.1.50.0210.01134.44
7.1.00.0030.07722.35
7.0.200.0070.00716.86
7.0.140.0000.07321.95
7.0.100.0170.02319.94
7.0.90.0030.04319.88
7.0.80.0100.04019.91
7.0.70.0030.03319.90
7.0.60.0100.03020.05
7.0.50.0130.03320.38
7.0.40.0100.02720.13
7.0.30.0000.03720.14
7.0.20.0000.03720.04
7.0.10.0030.03720.09
7.0.00.0030.03720.14
5.6.280.0070.07021.16
5.6.250.0100.03020.60
5.6.240.0000.03720.63
5.6.230.0070.04020.79
5.6.220.0130.02320.52
5.6.210.0000.03720.50
5.6.200.0030.03721.12
5.6.190.0030.03321.14
5.6.180.0030.03321.06
5.6.170.0030.03320.98
5.6.160.0030.04021.11
5.6.150.0030.03321.11
5.6.140.0070.04321.04
5.6.130.0030.04021.16
5.6.120.0030.09021.13
5.6.110.0130.08720.95
5.6.100.0070.08721.02
5.6.90.0030.08021.15
5.6.80.0000.06020.52
5.6.70.0170.05020.41
5.6.60.0030.08020.36
5.6.50.0030.07320.59
5.6.40.0100.07720.41
5.6.30.0070.06720.44
5.6.20.0130.07020.52
5.6.10.0000.04720.47
5.6.00.0030.04320.32
5.5.380.0000.04320.39
5.5.370.0030.04020.58
5.5.360.0100.03020.37
5.5.350.0030.03320.51
5.5.340.0100.02720.84
5.5.330.0030.03320.88
5.5.320.0030.03720.93
5.5.310.0030.05020.90
5.5.300.0070.03720.83
5.5.290.0070.04020.77
5.5.280.0070.03320.88
5.5.270.0130.08320.80
5.5.260.0000.08020.80
5.5.250.0070.08020.49
5.5.240.0070.10020.29
5.5.230.0170.06020.34
5.5.220.0130.07720.25
5.5.210.0070.06020.15
5.5.200.0030.07020.03
5.5.190.0200.03720.29
5.5.180.0100.04020.29
5.5.160.0030.04320.19
5.5.150.0070.06720.29
5.5.140.0100.07020.18
5.5.130.0070.04320.14
5.5.120.0070.07720.24
5.5.110.0000.04720.25
5.5.100.0070.07720.14
5.5.90.0070.08020.20
5.5.80.0000.08320.20
5.5.70.0000.04320.00
5.5.60.0030.04020.18
5.5.50.0070.06020.16
5.5.40.0130.06020.00
5.5.30.0100.07320.15
5.5.20.0170.04020.00
5.5.10.0070.08320.06
5.5.00.0030.08020.12
5.4.450.0030.04019.49
5.4.440.0070.08719.27
5.4.430.0100.07319.20
5.4.420.0070.08019.20
5.4.410.0130.05319.22
5.4.400.0100.07019.23
5.4.390.0070.07719.09
5.4.380.0070.06719.05
5.4.370.0030.04319.03
5.4.360.0030.06019.14
5.4.350.0070.03719.06
5.4.340.0030.04319.09
5.4.320.0030.04319.12
5.4.310.0070.03319.07
5.4.300.0070.04318.90
5.4.290.0170.06718.84
5.4.280.0030.07718.90
5.4.270.0070.06319.13
5.4.260.0030.07318.85
5.4.250.0100.03019.05
5.4.240.0130.07018.94
5.4.230.0030.09019.23
5.4.220.0100.07319.09
5.4.210.0130.06719.08
5.4.200.0170.06719.04
5.4.190.0130.07018.84
5.4.180.0030.08318.91
5.4.170.0030.04019.03
5.4.160.0100.03019.03
5.4.150.0030.08319.01
5.4.140.0100.02716.47
5.4.130.0030.03316.46
5.4.120.0100.02316.38
5.4.110.0130.06016.48
5.4.100.0030.04316.46
5.4.90.0030.07316.32
5.4.80.0000.03716.43
5.4.70.0030.08316.35
5.4.60.0100.06716.36
5.4.50.0070.07016.45
5.4.40.0070.07716.30
5.4.30.0130.06316.41
5.4.20.0070.07316.46
5.4.10.0070.07716.52
5.4.00.0070.07015.96
5.3.290.0070.07714.81
5.3.280.0030.06714.56
5.3.270.0000.07314.75
5.3.260.0000.04314.62
5.3.250.0100.05014.68
5.3.240.0070.07714.67
5.3.230.0070.06714.74
5.3.220.0130.04314.58
5.3.210.0130.07014.64
5.3.200.0070.07714.63
5.3.190.0030.08014.62
5.3.180.0030.04014.74
5.3.170.0100.07314.56
5.3.160.0100.07314.72
5.3.150.0000.08014.66
5.3.140.0100.07314.71
5.3.130.0000.06314.69
5.3.120.0100.05014.57
5.3.110.0100.06014.68
5.3.100.0070.04014.18
5.3.90.0100.06314.19
5.3.80.0030.07314.05
5.3.70.0100.07314.07
5.3.60.0000.08014.18
5.3.50.0000.08013.92
5.3.40.0070.07714.11
5.3.30.0070.07314.04
5.3.20.0070.06013.77
5.3.10.0030.04713.69
5.3.00.0130.06713.80
5.2.170.0100.04011.31
5.2.160.0070.04711.12
5.2.150.0000.03711.05
5.2.140.0070.05011.11
5.2.130.0070.02711.16
5.2.120.0030.04311.17
5.2.110.0030.06011.29
5.2.100.0100.04311.21
5.2.90.0130.05011.08
5.2.80.0100.03011.21
5.2.70.0100.05311.20
5.2.60.0100.04311.02
5.2.50.0130.05711.08
5.2.40.0030.03010.93
5.2.30.0070.03011.08
5.2.20.0070.06310.93
5.2.10.0030.05311.02
5.2.00.0070.05710.70
5.1.60.0100.04310.13
5.1.50.0070.05010.11
5.1.40.0070.0509.86
5.1.30.0000.05710.29
5.1.20.0130.05010.44
5.1.10.0070.04010.23
5.1.00.0030.04710.21
5.0.50.0000.0509.30
5.0.40.0000.0279.30
5.0.30.0030.0639.30
5.0.20.0000.0339.30
5.0.10.0030.0439.30
5.0.00.0070.0479.30
4.4.90.0000.0339.30
4.4.80.0000.0209.30
4.4.70.0000.0379.30
4.4.60.0000.0409.30
4.4.50.0030.0209.30
4.4.40.0000.0579.30
4.4.30.0030.0379.30
4.4.20.0030.0379.30
4.4.10.0000.0309.30
4.4.00.0030.0579.30
4.3.110.0100.0179.30
4.3.100.0030.0339.30
4.3.90.0030.0339.30
4.3.80.0000.0279.30
4.3.70.0030.0309.30
4.3.60.0000.0339.30
4.3.50.0000.0409.30
4.3.40.0000.0579.30
4.3.30.0030.0339.30
4.3.20.0030.0379.30
4.3.10.0030.0379.30
4.3.00.0030.0339.30

preferences:
51.63 ms | 401 KiB | 5 Q