3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface NodeInterface { public function addNode(Node $node); public function isLeaf(); public function isNode(); public function getKey(); public function setKey($key); public function getValue(); public function setValue($value); public function getUid(); public function uid(); public function key(); public function value(); } class ArrComp implements NodeInterface { protected $uid; protected $nodes; protected $value; public function __construct($key = null, $value = null) { $this->uid = rand(0, 9) . md5(rand(10, 99) . time() . rand(100, 999)) . rand(1000, 9999); $this->value->key = $key; $this->value->val = $value; } public function addNode(Node $node) { $this->nodes[] = $node; return $this; } public function isLeaf() { return count($this->nodes) == 0; } public function isNode() { return count($this->nodes) > 0; } public function getKey() { return $this->value->key; } public function key() { return $this->value->key; } public function setKey($key = null) { $this->value->key = $key; return $this; } public function getValue() { return $this->value->val; } public function value() { return $this->value->val; } public function setValue($value = null) { $this->value->val = $value; return $this; } public function getUid() { return $this->uid; } public function uid() { return $this->uid; } } $comp = new ArrComp('pk'); var_dump($comp);

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)
7.3.10.0040.00816.45
7.3.00.0030.00516.45
7.2.130.0070.00416.97
7.2.120.0000.01116.85
7.2.110.0070.00416.93
7.2.100.0060.00617.00
7.2.90.0060.00616.95
7.2.80.0040.00416.95
7.2.70.0040.01216.99
7.2.60.0000.01117.09
7.2.50.0070.00416.64
7.2.40.0110.00016.97
7.2.30.0090.00617.18
7.2.20.0040.01217.11
7.2.10.0030.00616.60
7.2.00.0030.01216.91
7.1.250.0090.00616.02
7.1.70.0080.00017.30
7.1.60.0100.01419.29
7.1.50.0030.02017.04
7.1.00.0030.07722.28
7.0.200.0000.00716.51
7.0.140.0070.07022.15
7.0.110.0070.08021.64
7.0.100.0070.06021.82
7.0.90.0030.04021.79
7.0.80.0070.04021.71
7.0.70.0230.04021.61
7.0.60.0070.04021.68
7.0.50.0030.04022.04
7.0.40.0030.04320.17
7.0.30.0070.04020.20
7.0.20.0000.03720.07
7.0.10.0030.03320.13
7.0.00.0030.07320.01
5.6.280.0000.07721.15
5.6.260.0030.08720.56
5.6.250.0070.06720.65
5.6.240.0100.07020.53
5.6.230.0070.03720.69
5.6.220.0070.06320.64
5.6.210.0100.05320.55
5.6.200.0030.06321.19
5.6.190.0030.04320.98
5.6.180.0030.04321.05
5.6.170.0030.03320.90
5.6.160.0070.06720.93
5.6.150.0070.07321.19
5.6.140.0030.08721.19
5.6.130.0100.05721.18
5.6.120.0070.07321.04
5.6.110.0170.05321.06
5.6.100.0000.09321.04
5.6.90.0070.05021.19
5.6.80.0070.06020.33
5.6.70.0100.03320.45
5.6.60.0030.04020.39
5.6.50.0130.06020.29
5.6.40.0070.06320.34
5.6.30.0070.06020.56
5.6.20.0100.06720.56
5.6.10.0100.06720.46
5.6.00.0170.06020.43
5.5.380.0130.08020.36
5.5.370.0170.07320.34
5.5.360.6700.03713.36
5.5.350.0100.08020.13
5.5.340.0070.04020.84
5.5.330.0070.03720.75
5.5.320.0000.04720.75
5.5.310.0030.04320.84
5.5.300.0030.04720.84
5.5.290.0070.08020.78
5.5.280.0000.05320.95
5.5.270.0070.04720.85
5.5.260.0130.03720.85
5.5.250.0070.04320.68
5.5.240.0100.05020.30
5.5.230.0070.06020.12
5.5.220.0030.04320.36
5.5.210.0030.04320.32
5.5.200.0030.08320.22
5.5.190.0030.08720.25
5.5.180.0000.07020.11
5.5.160.0070.08020.21
5.5.150.0070.06320.27
5.5.140.0100.06720.28
5.5.130.0070.04320.06
5.5.120.0030.07020.13
5.5.110.0100.05320.27
5.5.100.0100.04319.99
5.5.90.0000.07720.05
5.5.80.0000.04720.22
5.5.70.0070.08020.01
5.5.60.0070.03720.12
5.5.50.0030.04020.21
5.5.40.0030.04719.97
5.5.30.0070.03720.22
5.5.20.0100.08720.21
5.5.10.0200.04719.90
5.5.00.0070.08020.04
5.4.450.0030.09019.41
5.4.440.0070.05719.45
5.4.430.0000.06019.21
5.4.420.0000.05019.43
5.4.410.0130.03319.46
5.4.400.0030.04318.94
5.4.390.0100.03719.26
5.4.380.0070.05318.96
5.4.370.0000.07019.18
5.4.360.0170.03719.13
5.4.350.0000.04319.09
5.4.340.0030.05319.03
5.4.320.0130.07019.19
5.4.310.0000.07018.89
5.4.300.0070.05318.97
5.4.290.0000.04719.11
5.4.280.0100.06019.09
5.4.270.0070.07318.92
5.4.260.0100.07319.12
5.4.250.0000.06318.97
5.4.240.0030.04718.94
5.4.230.0100.06318.97
5.4.220.0030.04018.89
5.4.210.0070.06319.12
5.4.200.0030.07318.94
5.4.190.0030.06018.95
5.4.180.0100.07019.16
5.4.170.0130.05719.18
5.4.160.0070.05719.08
5.4.150.0130.04018.93
5.4.140.0100.06316.24
5.4.130.0130.03016.33
5.4.120.0000.04016.28
5.4.110.0000.07316.48
5.4.100.0000.06016.49
5.4.90.0070.06316.23
5.4.80.0100.05016.43
5.4.70.0030.04716.25
5.4.60.0030.06716.46
5.4.50.0200.03016.52
5.4.40.0030.04316.44
5.4.30.0070.05016.50
5.4.20.0000.05016.29
5.4.10.0100.06716.54
5.4.00.0030.07315.86
5.3.290.0100.06714.92
5.3.280.0200.03314.75
5.3.270.0100.07314.71
5.3.260.0030.06714.50
5.3.250.0030.04314.70
5.3.240.0070.03714.58
5.3.230.0100.07314.61
5.3.220.0070.07714.56
5.3.210.0030.08014.68
5.3.200.0070.03714.59
5.3.190.0030.06314.57
5.3.180.0270.03314.54
5.3.170.0100.06314.71
5.3.160.0070.07314.82
5.3.150.0000.08014.54
5.3.140.0030.03714.58
5.3.130.0030.07714.71
5.3.120.0000.08014.70
5.3.110.0000.04014.55
5.3.100.0030.05714.29
5.3.90.0000.03314.18
5.3.80.0000.06714.12
5.3.70.0000.04314.00
5.3.60.0070.03314.16
5.3.50.0130.03013.98
5.3.40.0030.06314.12
5.3.30.0100.02314.01
5.3.20.0070.02313.80
5.3.10.0000.03313.63
5.3.00.0000.03013.71
5.2.170.0000.04012.84
5.2.160.0030.02712.85
5.2.150.0030.02712.88
5.2.140.0030.05312.92
5.2.130.0070.02012.95
5.2.120.0030.06012.96
5.2.110.0070.03012.98
5.2.100.0030.06013.01
5.2.90.0030.06013.02
5.2.80.0030.02313.03
5.2.70.0100.02013.04
5.2.60.0000.06013.05
5.2.50.0030.06013.06
5.2.40.0030.06313.06
5.2.30.0000.02713.07
5.2.20.0000.02713.08
5.2.10.0000.03013.13
5.2.00.0000.02313.16
5.1.60.0070.04313.18
5.1.50.0000.05313.21
5.1.40.0000.05313.26
5.1.30.0030.05713.27
5.1.20.0070.05313.28
5.1.10.0070.03713.30
5.1.00.0070.01713.30
5.0.50.0070.04313.30
5.0.40.0000.02713.30
5.0.30.0030.02713.30
5.0.20.0070.01313.30
5.0.10.0030.01713.30
5.0.00.0000.07013.30
4.4.90.0000.03713.05
4.4.80.0000.01713.06
4.4.70.0030.03313.09
4.4.60.0030.01313.10
4.4.50.0000.01713.12
4.4.40.0000.02013.20
4.4.30.0030.02713.23
4.4.20.0000.01313.30
4.4.10.0030.03313.30
4.4.00.0000.02313.30
4.3.110.0000.01313.30
4.3.100.0030.01013.30
4.3.90.0030.01013.30
4.3.80.0000.04713.30
4.3.70.0070.02013.30
4.3.60.0000.03013.30
4.3.50.0000.01313.30
4.3.40.0070.03713.30
4.3.30.0000.01313.30
4.3.20.0000.01713.30
4.3.10.0000.03713.30
4.3.00.0000.01313.30

preferences:
36.99 ms | 400 KiB | 5 Q