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); $e = unserialize($serializedE); $e->getMethods(); $e->getProperties();

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.0110.00718.55
8.3.50.0070.00822.17
8.3.40.0120.00318.85
8.3.30.0070.01019.23
8.3.20.0000.00720.42
8.3.10.0000.00822.14
8.3.00.0040.00422.44
8.2.180.0100.01016.75
8.2.170.0140.00722.96
8.2.160.0140.00020.89
8.2.150.0000.00824.18
8.2.140.0090.00024.66
8.2.130.0080.00026.16
8.2.120.0050.00319.48
8.2.110.0060.00322.11
8.2.100.0080.00319.64
8.2.90.0060.00319.21
8.2.80.0040.00418.03
8.2.70.0040.00417.63
8.2.60.0030.00517.93
8.2.50.0080.00018.07
8.2.40.0090.00318.28
8.2.30.0000.00718.14
8.2.20.0030.00517.73
8.2.10.0050.00317.69
8.2.00.0030.00517.69
8.1.280.0120.00325.92
8.1.270.0080.00022.32
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0060.00323.90
8.1.230.0030.00719.18
8.1.220.0040.00417.77
8.1.210.0000.00818.77
8.1.200.0070.00317.60
8.1.190.0040.00417.75
8.1.180.0040.00418.86
8.1.170.0070.00418.73
8.1.160.0040.00421.99
8.1.150.0040.00418.69
8.1.140.0040.00417.55
8.1.130.0000.00817.52
8.1.120.0070.00017.51
8.1.110.0060.00317.48
8.1.100.0040.00417.54
8.1.90.0070.00017.59
8.1.80.0050.00217.54
8.1.70.0030.00317.55
8.1.60.0040.00417.70
8.1.50.0030.00617.61
8.1.40.0000.00817.48
8.1.30.0060.00317.61
8.1.20.0080.00017.65
8.1.10.0040.00417.51
8.1.00.0040.00417.42
8.0.300.0000.00718.77
8.0.290.0000.00917.18
8.0.280.0000.00718.43
8.0.270.0070.00017.20
8.0.260.0070.00016.85
8.0.250.0000.00717.11
8.0.240.0050.00317.08
8.0.230.0070.00017.04
8.0.220.0030.00316.93
8.0.210.0000.00716.90
8.0.200.0030.00317.10
8.0.190.0070.00417.09
8.0.180.0000.01016.96
8.0.170.0000.00717.06
8.0.160.0000.00717.02
8.0.150.0000.00716.94
8.0.140.0050.00316.98
8.0.130.0030.00313.50
8.0.120.0030.00516.86
8.0.110.0000.00717.13
8.0.100.0020.00516.92
8.0.90.0000.00717.07
8.0.80.0110.00417.03
8.0.70.0000.00717.05
8.0.60.0070.00016.93
8.0.50.0000.00717.07
8.0.30.0130.00817.25
8.0.20.0090.01217.40
8.0.10.0000.00816.95
8.0.00.0120.00816.87
7.4.330.0020.00215.00
7.4.320.0000.00716.62
7.4.300.0060.00016.55
7.4.290.0030.00316.71
7.4.280.0040.00416.57
7.4.270.0030.00616.49
7.4.260.0000.00816.64
7.4.250.0000.00816.55
7.4.240.0000.00716.63
7.4.230.0030.00316.62
7.4.220.0100.00716.76
7.4.210.0080.00716.63
7.4.200.0000.00716.65
7.4.190.0040.00416.61
7.4.160.0030.01316.71
7.4.150.0110.00717.40
7.4.140.0150.00817.86
7.4.130.0090.00916.48
7.4.120.0110.00816.60
7.4.110.0150.00616.54
7.4.100.0100.01416.77
7.4.90.0060.01216.59
7.4.80.0110.01119.39
7.4.70.0130.00416.51
7.4.60.0150.00316.37
7.4.50.0080.00016.46
7.4.40.0070.00722.77
7.4.30.0090.00616.73
7.4.00.0120.00314.96
7.3.330.0050.00013.41
7.3.320.0000.00513.30
7.3.310.0040.00416.35
7.3.300.0000.00716.43
7.3.290.0090.00516.39
7.3.280.0100.00916.43
7.3.270.0140.00717.40
7.3.260.0100.00816.46
7.3.250.0090.00916.65
7.3.240.0140.00916.58
7.3.230.0040.01816.70
7.3.210.0090.00916.66
7.3.200.0090.01219.39
7.3.190.0120.00916.61
7.3.180.0110.00516.48
7.3.170.0080.01216.41
7.3.160.0100.01016.60
7.3.120.0040.01214.93
7.2.330.0130.01016.67
7.2.320.0110.01216.80
7.2.310.0140.00316.72
7.2.300.0080.00816.51
7.2.290.0120.00616.56
7.2.60.0110.00716.93
7.2.00.0060.00619.50
7.1.200.0070.00415.67
7.1.100.0040.01118.30
7.1.70.0000.00817.23
7.1.60.0090.01619.82
7.1.50.0030.00917.04
7.1.00.0000.08022.43
7.0.200.0090.00016.62
7.0.140.0130.06322.12
7.0.80.0100.03719.92
7.0.70.0270.06319.92
7.0.60.0130.07019.95
7.0.50.0100.08320.31
7.0.40.0100.08320.12
7.0.30.0070.07020.11
7.0.20.0100.07020.05
7.0.10.0030.04019.95
7.0.00.0100.08020.14
5.6.280.0030.07320.91
5.6.230.0130.06720.73
5.6.220.0070.04020.69
5.6.210.0070.08020.73
5.6.200.0070.07021.00
5.6.190.0070.08021.07
5.6.180.0100.08021.09
5.6.170.0000.04721.11
5.6.160.0070.07721.07
5.6.150.0100.07321.11
5.6.140.0030.05021.09
5.6.130.0070.08720.98
5.6.120.0030.05720.99
5.6.110.0000.04721.00
5.6.100.0100.08321.11
5.6.90.0100.07321.20
5.6.80.0070.04320.36
5.6.70.0270.06720.43
5.6.60.0070.07020.37
5.6.50.0100.02720.51
5.6.40.0070.05020.46
5.6.30.0030.07720.43
5.6.20.0030.08020.56
5.6.10.0100.02720.34
5.6.00.0100.07320.32
5.5.370.0070.08320.39
5.5.360.0030.08320.60
5.5.350.0070.06020.49
5.5.340.0130.08020.79
5.5.330.0070.06020.70
5.5.320.0030.07320.88
5.5.310.0070.08320.69
5.5.300.0130.07720.88
5.5.290.0100.06320.85
5.5.280.0100.03720.94
5.5.270.0070.05720.80
5.5.260.0030.06320.92
5.5.250.0030.05720.50
5.5.240.0100.06720.36
5.5.230.0030.07020.29
5.5.220.0030.08020.05
5.5.210.0030.03720.25
5.5.200.0100.06020.26
5.5.190.0070.07720.33
5.5.180.0030.08020.32
5.5.160.0030.03320.26
5.5.150.0170.05720.32
5.5.140.0030.08320.19
5.5.130.0100.07320.29
5.5.120.0070.03720.03
5.5.110.0030.07720.31
5.5.100.0030.04020.21
5.5.90.0000.05720.00
5.5.80.0100.06719.99
5.5.70.0030.07320.20
5.5.60.0100.06020.13
5.5.50.0070.07020.18
5.5.40.0000.07020.01
5.5.30.0100.07020.10
5.5.20.0070.07020.20
5.5.10.0030.08320.09
5.5.00.0100.07020.18
5.4.450.0000.08319.43
5.4.440.0000.04319.50
5.4.430.0100.03019.42
5.4.420.0070.08319.20
5.4.410.0030.08319.43
5.4.400.0100.06718.88
5.4.390.0000.03719.18
5.4.380.0070.05319.21
5.4.370.0100.06719.14
5.4.360.0070.03019.18
5.4.350.0130.06719.13
5.4.340.0070.06319.13
5.4.320.0100.06319.18
5.4.310.0000.05019.23
5.4.300.0070.05018.87
5.4.290.0030.07318.88
5.4.280.0170.07719.04
5.4.270.0000.03718.84
5.4.260.0130.06019.04
5.4.250.0030.03719.17
5.4.240.0000.03719.08
5.4.230.0070.03718.86
5.4.220.0030.08319.08
5.4.210.0100.04719.11
5.4.200.0030.07319.02
5.4.190.0030.03319.06
5.4.180.0000.04719.13
5.4.170.0070.04019.02
5.4.160.0070.03018.85
5.4.150.0030.07319.19
5.4.140.0030.05716.52
5.4.130.0100.07016.46
5.4.120.0070.05016.38
5.4.110.0000.03316.39
5.4.100.0000.04316.49
5.4.90.0070.07716.47
5.4.80.0000.03716.55
5.4.70.0030.03016.28
5.4.60.0000.05716.47
5.4.50.0070.03016.56
5.4.40.0030.04016.46
5.4.30.0070.03016.49
5.4.20.0030.06716.45
5.4.10.0000.03716.46
5.4.00.0000.03315.83
5.3.290.0100.06314.83
5.3.280.0100.07014.57
5.3.270.0030.08014.63
5.3.260.0030.03314.68
5.3.250.0030.04014.62
5.3.240.0000.07014.76
5.3.230.0130.04314.66
5.3.220.0070.07314.56
5.3.210.0070.03314.66
5.3.200.0000.03314.59
5.3.190.0030.07714.67
5.3.180.0070.05714.75
5.3.170.0030.08014.71
5.3.160.0030.06714.75
5.3.150.0000.04714.56
5.3.140.0070.03314.55
5.3.130.0030.07314.54
5.3.120.0030.05714.68
5.3.110.0070.03314.73
5.3.100.0100.07714.03
5.3.90.0100.06013.98
5.3.80.0100.06714.16
5.3.70.0170.02314.09
5.3.60.0070.07014.14
5.3.50.0070.06014.09
5.3.40.0070.07014.06
5.3.30.0030.07714.10
5.3.20.0030.07313.83
5.3.10.0070.07313.76
5.3.00.0030.07313.59
5.2.170.0000.06711.97
5.2.160.0070.06011.97
5.2.150.0030.06011.97
5.2.140.0000.02711.97
5.2.130.0030.06011.97
5.2.120.0070.03011.97
5.2.110.0000.04711.97
5.2.100.0030.04711.97
5.2.90.0100.06011.97
5.2.80.0000.06011.97
5.2.70.0100.03011.97
5.2.60.0030.02711.97
5.2.50.0000.03011.97
5.2.40.0030.02711.97
5.2.30.0100.02011.97
5.2.20.0000.03011.97
5.2.10.0030.02711.97
5.2.00.0000.02711.97
5.1.60.0070.02011.97
5.1.50.0000.02711.97
5.1.40.0070.02011.97
5.1.30.0070.02011.97
5.1.20.0030.02311.97
5.1.10.0000.02311.97
5.1.00.0000.02711.97
5.0.50.0000.02011.97
5.0.40.0000.02311.97
5.0.30.0000.04711.97
5.0.20.0000.02311.97
5.0.10.0000.02711.97
5.0.00.0000.02711.97
4.4.90.0000.01711.97
4.4.80.0000.01711.97
4.4.70.0000.01711.97
4.4.60.0000.01311.97
4.4.50.0000.01711.97
4.4.40.0070.04011.97
4.4.30.0030.01311.97
4.4.20.0030.01311.97
4.4.10.0000.01311.97
4.4.00.0000.02311.97
4.3.110.0030.01311.97
4.3.100.0000.01711.97
4.3.90.0030.01311.97
4.3.80.0000.02011.97
4.3.70.0000.01311.97
4.3.60.0030.01711.97
4.3.50.0030.01311.97
4.3.40.0000.02311.97
4.3.30.0000.01311.97
4.3.20.0000.03011.97
4.3.10.0000.02011.97
4.3.00.0000.01711.97

preferences:
29.27 ms | 401 KiB | 5 Q