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 ArrayComposition implements NodeInterface { protected $uid; protected $nodes; protected $value; public function __construct($value = null, $key = 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; } }

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.4.10.0120.00415.00
7.4.00.0070.01115.07
7.3.130.0030.01314.90
7.3.120.0110.00814.89
7.3.110.0030.01314.76
7.3.100.0050.00814.57
7.3.90.0090.00514.74
7.3.80.0080.00414.72
7.3.70.0050.00814.65
7.3.60.0050.01114.80
7.3.50.0000.01214.75
7.3.40.0030.01014.82
7.3.30.0020.01014.60
7.3.20.0030.00916.31
7.3.10.0060.00616.56
7.3.00.0040.00516.50
7.2.260.0070.01314.98
7.2.250.0060.01114.79
7.2.240.0050.01214.63
7.2.230.0050.01114.87
7.2.220.0020.01414.74
7.2.210.0050.01014.83
7.2.200.0100.00314.94
7.2.190.0060.01114.69
7.2.180.0040.00914.88
7.2.170.0080.00914.73
7.2.160.0120.00314.87
7.2.150.0120.00316.75
7.2.140.0030.01216.51
7.2.130.0060.00616.76
7.2.120.0040.00816.88
7.2.110.0030.01016.80
7.2.100.0040.00816.63
7.2.90.0030.00916.92
7.2.80.0100.00616.52
7.2.70.0040.00817.01
7.2.60.0000.01617.00
7.2.50.0060.00316.68
7.2.40.0040.00716.61
7.2.30.0030.00916.68
7.2.20.0080.00816.86
7.2.10.0070.01016.54
7.2.00.0070.01117.00
7.1.330.0030.01015.57
7.1.320.0020.01115.68
7.1.310.0040.00915.55
7.1.300.0080.00615.61
7.1.290.0100.00415.62
7.1.280.0000.01115.64
7.1.270.0070.00615.57
7.1.260.0080.00615.52
7.1.250.0090.00315.70
7.1.240.0070.00415.64
7.1.230.0130.00015.59
7.1.220.0070.00715.65
7.1.210.0000.01415.79
7.1.200.0000.01715.28
7.1.190.0100.00315.74
7.1.180.0000.01115.69
7.1.170.0030.01115.27
7.1.160.0060.01015.67
7.1.150.0000.01215.60
7.1.140.0000.01415.53
7.1.130.0030.01415.47
7.1.120.0070.00415.61
7.1.110.0030.00715.81
7.1.100.0080.00415.78
7.1.90.0030.01015.49
7.1.80.0060.00615.56
7.1.70.0040.00716.30
7.1.60.0110.00817.46
7.1.50.0110.00716.11
7.1.40.0060.00615.33
7.1.30.0030.01015.47
7.1.20.0100.00715.60
7.1.10.0060.00615.73
7.1.00.0050.04219.01
7.0.330.0060.00915.46
7.0.320.0060.00615.03
7.0.310.0030.00915.33
7.0.300.0060.00615.16
7.0.290.0040.01115.29
7.0.280.0110.00415.03
7.0.270.0090.00615.24
7.0.260.0040.00815.29
7.0.250.0040.00815.33
7.0.240.0030.01315.47
7.0.230.0140.00415.36
7.0.220.0030.00814.89
7.0.210.0030.00915.38
7.0.200.0110.00414.95
7.0.190.0040.00815.27
7.0.180.0100.00315.18
7.0.170.0070.01115.54
7.0.160.0000.00915.22
7.0.150.0030.01015.32
7.0.140.0050.04018.78
7.0.130.0150.00015.36
7.0.120.0020.04318.64
7.0.110.0030.01015.14
7.0.100.0180.04017.76
7.0.90.0150.02517.68
7.0.80.0250.04217.62
7.0.70.0150.04717.46
7.0.60.0220.04417.67
7.0.50.0180.04417.71
7.0.40.0050.02516.60
7.0.30.0110.01716.79
7.0.20.0030.02516.63
7.0.10.0030.02716.71
7.0.00.0040.02416.71
5.6.400.0070.00714.34
5.6.390.0060.00614.52
5.6.380.0070.00714.22
5.6.370.0070.00714.05
5.6.360.0030.01314.11
5.6.350.0030.01214.46
5.6.340.0080.00414.43
5.6.330.0060.00914.29
5.6.320.0080.00413.93
5.6.310.0000.01014.08
5.6.300.0070.01014.45
5.6.290.0000.01514.16
5.6.280.0110.03317.70
5.6.270.0000.01114.36
5.6.260.0030.01414.29
5.6.250.0180.03317.47
5.6.240.0110.04017.43
5.6.230.0080.04817.41
5.6.220.0070.04317.52
5.6.210.0050.04517.45
5.6.200.0120.04017.69
5.6.190.0020.03017.69
5.6.180.0030.03317.68
5.6.170.0100.02017.49
5.6.160.0030.02617.72
5.6.150.0040.02917.83
5.6.140.0080.02117.73
5.6.130.0050.02917.53
5.6.120.0050.03617.63
5.6.110.0050.02517.52
5.6.100.0060.02417.58
5.6.90.0080.03617.66
5.6.80.0050.03617.34
5.6.70.0070.02917.16
5.6.60.0030.03017.17
5.6.50.0030.03717.23
5.6.40.0090.02217.28
5.6.30.0080.02617.28
5.6.20.0040.02517.23
5.6.10.0080.02017.22
5.6.00.0050.02517.21
5.5.380.0060.04217.28
5.5.370.0020.04817.38
5.5.360.0070.04217.28
5.5.350.0080.03217.35
5.5.340.0050.04517.58
5.5.330.0080.03817.33
5.5.320.0030.02617.51
5.5.310.0070.02717.55
5.5.300.0120.02117.46
5.5.290.0050.02217.46
5.5.280.0030.02717.34
5.5.270.0030.02517.44
5.5.260.0050.03217.41
5.5.250.0090.02017.21
5.5.240.0060.02817.11
5.5.230.0060.02517.20
5.5.220.0090.02017.16
5.5.210.0080.01917.25
5.5.200.0030.03717.05
5.5.190.0030.02317.16
5.5.180.0080.02716.86
5.5.170.0070.00713.87
5.5.160.0070.01917.16
5.5.150.0050.02116.89
5.5.140.0070.02217.13
5.5.130.0050.02317.21
5.5.120.0020.02216.96
5.5.110.0060.02217.20
5.5.100.0100.01817.16
5.5.90.0010.02817.13
5.5.80.0030.02516.99
5.5.70.0060.02316.82
5.5.60.0080.02517.11
5.5.50.0130.02817.04
5.5.40.0020.04817.05
5.5.30.0060.04017.12
5.5.20.0030.04817.05
5.5.10.0070.04117.12
5.5.00.0050.02917.04
5.4.450.0030.02316.16
5.4.440.0070.01916.01
5.4.430.0040.02216.01
5.4.420.0030.02315.96
5.4.410.0020.02716.05
5.4.400.0050.02315.94
5.4.390.0040.02015.89
5.4.380.0030.02515.96
5.4.370.0140.01215.89
5.4.360.0020.02515.89
5.4.350.0050.03815.85
5.4.340.0030.02015.91
5.4.330.0060.00612.75
5.4.320.0030.02415.90
5.4.310.0000.02515.89
5.4.300.0050.02315.79
5.4.290.0070.02315.89
5.4.280.0030.02415.79
5.4.270.0070.01815.82
5.4.260.0050.02615.98
5.4.250.0020.02315.79
5.4.240.0070.02715.88
5.4.230.0050.03015.88
5.4.220.0020.03115.80
5.4.210.0050.03815.97
5.4.200.0050.03115.96
5.4.190.0070.02315.82
5.4.180.0020.04515.99
5.4.170.0100.03615.80
5.4.160.0090.03815.88
5.4.150.0080.03815.81
5.4.140.0050.02514.54
5.4.130.0050.02714.60
5.4.120.0130.03414.60
5.4.110.0030.03914.57
5.4.100.0090.03514.56
5.4.90.0040.03914.63
5.4.80.0030.03114.57
5.4.70.0040.03514.58
5.4.60.0090.03814.54
5.4.50.0120.02614.54
5.4.40.0030.03814.60
5.4.30.0050.02814.60
5.4.20.0030.02814.50
5.4.10.0100.03314.57
5.4.00.0080.03714.30
5.3.290.0030.03013.69
5.3.280.0050.02313.65
5.3.270.0000.04513.66
5.3.260.0060.02313.71
5.3.250.0070.03513.72
5.3.240.0080.03513.68
5.3.230.0080.03813.75
5.3.220.0070.04313.67
5.3.210.0060.04213.65
5.3.200.0000.02713.66
5.3.190.0070.04313.66
5.3.180.0050.03813.68
5.3.170.0020.04513.68
5.3.160.0050.04013.70
5.3.150.0070.02013.72
5.3.140.0030.03713.66
5.3.130.0100.03213.65
5.3.120.0050.04013.71
5.3.110.0040.04213.66
5.3.100.0030.03713.42
5.3.90.0030.04313.37
5.3.80.0050.03313.39
5.3.70.0030.03013.43
5.3.60.0080.04013.42
5.3.50.0030.04113.40
5.3.40.0070.03613.38
5.3.30.0020.02413.39
5.3.20.0010.04113.22
5.3.10.0060.02613.27
5.3.00.0050.04413.20
5.2.170.0030.06011.46
5.2.160.0100.05711.46
5.2.150.0030.04011.46
5.2.140.0100.06311.46
5.2.130.0030.06311.46
5.2.120.0000.07011.46
5.2.110.0070.03311.46
5.2.100.0100.06011.46
5.2.90.0200.04711.46
5.2.80.0070.04711.46
5.2.70.0070.04711.46
5.2.60.0100.05711.46
5.2.50.0100.05711.46
5.2.40.0070.06011.46
5.2.30.0070.03711.46
5.2.20.0000.03011.46
5.2.10.0030.04711.46
5.2.00.0000.04011.46
5.1.60.0000.03011.46
5.1.50.0000.03711.46
5.1.40.0030.05311.46
5.1.30.0070.05711.46
5.1.20.0000.06311.46
5.1.10.0030.03011.46
5.1.00.0030.02711.46
5.0.50.0070.03711.46
5.0.40.0070.04311.46
5.0.30.0000.03711.46
5.0.20.0000.03711.46
5.0.10.0070.04011.46
5.0.00.0030.06011.46
4.4.90.0000.02711.46
4.4.80.0000.03011.46
4.4.70.0030.02711.46
4.4.60.0030.03711.46
4.4.50.0070.03011.46
4.4.40.0070.04711.46
4.4.30.0030.01711.46
4.4.20.0000.03711.46
4.4.10.0000.02011.46
4.4.00.0030.03311.46
4.3.110.0030.01711.46
4.3.100.0030.03311.46
4.3.90.0030.01711.46
4.3.80.0030.05711.46
4.3.70.0070.03011.46
4.3.60.0030.03011.46
4.3.50.0100.02711.46
4.3.40.0000.04311.46
4.3.30.0030.03711.46
4.3.20.0030.03311.46
4.3.10.0000.02711.46
4.3.00.0000.03711.46

preferences:
32.52 ms | 401 KiB | 5 Q