3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Acl implements \Serializable { private $id; private $objectIdentity; public function __construct($id, $objectIdentity) { $this->id = $id; $this->objectIdentity = $objectIdentity; } public function serialize() { return serialize([$this->id, $this->objectIdentity]); } public function unserialize($string) { list ($this->id, $this->objectIdentity) = unserialize($string); } } class Entry implements \Serializable { private $id; private $acl; private $sid; public function __construct($id, $acl, $sid) { $this->id = $id; $this->acl = $acl; $this->sid = $sid; } public function getSid() { return $this->sid; } public function serialize() { return serialize([$this->id, $this->sid]); } public function unserialize($string) { list ($this->id, $this->sid) = unserialize($string); } } class FieldEntry extends Entry implements \Serializable { private $field; public function __construct($id, $acl, $field, $sid) { parent::__construct($id, $acl, $sid); $this->field = $field; } public function serialize() { return serialize([$this->field, parent::serialize()]); } public function unserialize($string) { list($this->field, $parentStr) = unserialize($string); parent::unserialize($parentStr); } } final class Role { private $role; public function __construct($name) { $this->role = $name; } public function getRole() { return $this->role; } public function __toString() { return sprintf('RoleSecurityIdentity(%s)', $this->role); } } $acl = new Acl(1, null); $acl = new Acl(2, null); $sid = new Role('test'); $a = new FieldEntry(1, $acl, 'name', $sid, 'blabla'); $a1 = new FieldEntry(2, $acl, 'age', $sid, 'blabla'); $s = serialize( array( // Acl:serialize (line 260) [ // classFieldAces 'fieldOne' => [$a], 'fieldTwo' => [$a1], ] ) ); var_dump($s); $uns = unserialize($s); var_dump($uns[0]['fieldOne'][0]->getSid(), $uns[0]['fieldTwo'][0]->getSid());

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.70.0130.00318.45
8.3.60.0190.00616.49
8.3.50.0110.00821.12
8.3.40.0070.00718.96
8.3.30.0090.00618.50
8.3.20.0040.00420.16
8.3.10.0030.00623.65
8.3.00.0040.00419.68
8.2.180.0120.00618.41
8.2.170.0110.00422.96
8.2.160.0110.00320.38
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0050.00326.16
8.2.120.0080.00017.63
8.2.110.0080.00022.07
8.2.100.0030.00917.97
8.2.90.0040.00419.30
8.2.80.0050.00317.97
8.2.70.0050.00317.63
8.2.60.0080.00317.93
8.2.50.0080.00018.07
8.2.40.0000.00821.10
8.2.30.0040.00420.59
8.2.20.0080.00017.80
8.2.10.0000.00818.24
8.2.00.0040.00418.12
8.1.280.0140.00025.92
8.1.270.0060.00923.87
8.1.260.0040.00426.35
8.1.250.0110.00728.09
8.1.240.0140.00022.03
8.1.230.0060.00622.74
8.1.220.0000.00817.77
8.1.210.0050.00318.77
8.1.200.0040.00417.24
8.1.190.0000.00817.25
8.1.180.0040.00418.10
8.1.170.0040.00420.37
8.1.160.0040.00422.07
8.1.150.0050.00219.02
8.1.140.0030.00619.74
8.1.130.0000.00717.80
8.1.120.0000.00717.56
8.1.110.0000.00717.51
8.1.100.0070.00017.54
8.1.90.0000.00717.57
8.1.80.0000.00717.52
8.1.70.0030.00517.49
8.1.60.0000.00717.52
8.1.50.0100.00017.46
8.1.40.0060.00317.55
8.1.30.0000.00817.74
8.1.20.0000.00817.54
8.1.10.0000.00817.52
8.1.00.0000.00817.57
8.0.300.0070.00018.77
8.0.290.0040.00416.88
8.0.280.0000.00818.46
8.0.270.0070.00017.25
8.0.260.0060.00017.31
8.0.250.0040.00417.08
8.0.240.0030.00317.02
8.0.230.0080.00017.09
8.0.220.0070.00016.98
8.0.210.0000.00716.98
8.0.200.0060.00317.07
8.0.190.0000.00916.97
8.0.180.0000.00716.94
8.0.170.0040.00416.88
8.0.160.0000.00816.95
8.0.150.0030.00616.91
8.0.140.0050.00216.93
8.0.130.0030.00313.48
8.0.120.0000.00716.95
8.0.110.0000.00717.05
8.0.100.0050.00316.81
8.0.90.0020.00517.01
8.0.80.0090.00616.91
8.0.70.0050.00317.05
8.0.60.0070.00016.90
8.0.50.0050.00217.03
8.0.30.0120.00517.19
8.0.20.0070.01117.40
8.0.10.0060.00317.14
8.0.00.0100.00816.80
7.4.330.0030.00315.08
7.4.320.0000.00616.64
7.4.300.0030.00316.50
7.4.290.0000.00716.52
7.4.280.0000.00816.45
7.4.270.0040.00416.55
7.4.260.0070.00016.55
7.4.250.0000.00716.54
7.4.240.0040.00316.55
7.4.230.0090.00016.46
7.4.220.0130.00716.65
7.4.210.0110.00716.49
7.4.200.0000.00716.59
7.4.160.0090.00916.57
7.4.150.0120.00817.40
7.4.140.0160.00317.86
7.4.130.0120.00716.63
7.4.120.0040.01416.69
7.4.110.0160.00916.57
7.4.100.0150.00616.61
7.4.90.0110.00716.57
7.4.80.0110.01219.39
7.4.70.0040.01516.61
7.4.60.0100.01016.66
7.4.50.0060.00316.34
7.4.40.0060.01116.70
7.4.30.0100.01016.62
7.4.00.0090.00614.93
7.3.330.0000.00513.50
7.3.320.0030.00313.42
7.3.310.0050.00316.52
7.3.300.0000.00816.49
7.3.290.0060.00716.51
7.3.280.0070.01116.51
7.3.270.0100.01017.40
7.3.260.0130.00516.53
7.3.250.0070.01216.68
7.3.240.0130.01016.48
7.3.230.0030.01716.57
7.3.210.0090.01216.63
7.3.200.0140.00716.44
7.3.190.0120.00616.55
7.3.180.0060.01016.52
7.3.170.0100.00616.51
7.3.160.0100.01016.52
7.3.120.0110.00714.88
7.3.110.0090.00914.81
7.3.100.0030.01215.06
7.3.90.0070.00715.15
7.3.80.0030.01314.77
7.3.70.0100.00715.03
7.3.60.0100.00314.70
7.3.50.0070.00414.95
7.3.40.0000.01114.95
7.3.30.0040.01514.80
7.3.20.0030.01716.75
7.3.10.0110.00416.59
7.3.00.0160.00016.72
7.2.330.0150.00316.72
7.2.320.0140.00516.47
7.2.310.0170.00016.89
7.2.300.0060.01216.52
7.2.290.0070.01216.93
7.2.240.0120.00315.09
7.2.230.0140.00314.87
7.2.220.0130.00315.25
7.2.210.0080.00815.04
7.2.200.0000.01315.00
7.2.190.0070.01115.02
7.2.180.0070.00414.94
7.2.170.0100.00715.13
7.2.160.0100.01015.10
7.2.150.0060.00916.99
7.2.140.0040.00816.96
7.2.130.0070.00716.76
7.2.120.0060.01216.98
7.2.110.0000.01216.86
7.2.100.0040.01116.95
7.2.90.0070.00716.88
7.2.80.0100.00316.71
7.2.70.0140.00316.66
7.2.60.0090.00717.02
7.2.50.0070.00717.03
7.2.40.0030.00717.10
7.2.30.0070.00417.08
7.2.20.0070.01117.15
7.2.10.0030.01316.86
7.2.00.0100.00718.19
7.1.330.0060.01215.77
7.1.320.0030.00916.07
7.1.310.0060.00315.92
7.1.300.0110.00415.47
7.1.290.0030.00615.77
7.1.280.0120.00315.84
7.1.270.0040.01516.00
7.1.260.0060.01015.66
7.1.250.0060.00316.02
7.1.200.0130.00015.80
7.1.100.0000.00918.21
7.1.70.0050.00216.95
7.1.60.0040.01519.50
7.1.50.0070.01617.02
7.1.00.0070.07022.45
7.0.200.0170.00714.94
7.0.60.0130.07320.04
7.0.50.0030.08317.95
7.0.40.0000.09720.30
7.0.30.0300.08020.23
7.0.20.0230.08320.21
7.0.10.0100.04020.09
7.0.00.0030.06020.08
5.6.280.0030.03321.05
5.6.210.0130.04320.64
5.6.200.0070.05018.23
5.6.190.0100.08720.55
5.6.180.0300.03020.67
5.6.170.0430.07020.56
5.6.160.0070.05320.54
5.6.150.0130.07018.25
5.6.140.0000.04018.27
5.6.130.0000.06018.23
5.6.120.0070.08021.05
5.6.110.0070.07021.08
5.6.100.0030.04321.17
5.6.90.0130.07720.99
5.6.80.0030.05720.40
5.5.350.0170.07020.35
5.5.340.0070.05317.97
5.5.330.0070.06020.40
5.5.320.3270.04020.35
5.5.310.0200.08720.20
5.5.300.0100.07718.07
5.5.290.0030.08317.95
5.5.280.0100.03720.80
5.5.270.0070.05720.78
5.5.260.0170.07720.79
5.5.250.0030.06720.72
5.5.240.0000.06720.11
5.4.450.0800.05719.71
5.4.440.0730.06319.30
5.4.430.0830.06719.45
5.4.420.0900.05319.32
5.4.410.0870.05319.30
5.4.400.0830.06019.24
5.4.390.0700.06719.30
5.4.380.0930.05319.35
5.4.370.0900.04319.25
5.4.360.0870.04719.35
5.4.350.0870.04319.03
5.4.340.0730.06319.12
5.4.320.0870.06019.12
5.4.310.1030.06319.14
5.4.300.0770.06718.96
5.4.290.0770.05019.13
5.4.280.0830.05018.85
5.4.270.1030.05718.87
5.4.260.0800.05019.22
5.4.250.0730.05719.21
5.4.240.0700.05719.22
5.4.230.0730.05319.11
5.4.220.0800.05719.13
5.4.210.0930.04719.24
5.4.200.0970.04718.96
5.4.190.1030.07019.11
5.4.180.1200.06018.80
5.4.170.1170.05019.09
5.4.160.1030.06319.32
5.4.150.0970.05719.25
5.4.140.0800.05316.55
5.4.130.0900.05316.53
5.4.120.0770.06016.33
5.4.110.0930.05316.20
5.4.100.0900.06016.62
5.4.90.0870.04716.37
5.4.80.0770.05016.61
5.4.70.0270.07016.39
5.4.60.0030.07016.25
5.4.50.0030.03316.34
5.4.40.0200.07016.28
5.4.30.0300.06316.35
5.4.20.0070.05316.53

preferences:
55.19 ms | 401 KiB | 5 Q