3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Update manifest generator for Chrome * * @category [cv-pls] * @package Chrome * @author Chris Wright <info@daverandom.com> */ class ChromeUpdateManifestGenerator { /** * @var string Namespace URL for manifest XML */ private $nsUrl = 'http://www.google.com/update2/response'; /** * Create a new node, append it to the specified parent and add attributes * * @param \DOMNode $parent * @param string $tagName * @param array $attributes * @return \DOMElement */ private function appendNode(\DOMNode $parent, $tagName, array $attributes = []) { $newNode = ($parent->ownerDocument ?: $parent)->createElementNS($this->nsUrl, $tagName); foreach ($attributes as $name => $value) { $newNode->setAttribute($name, $value); } $parent->appendChild($newNode); } /** * Generate the update manifest document * * @param string $appId * @param string $version * @param string $packageUrl * @return \DOMDocument */ public function generate($appId, $version, $packageUrl) { $document = new \DOMDocument('1.0', 'utf-8'); $document->formatOutput = true; $rootEl = $this->appendNode($document, 'gupdate', ['protocol' => '2.0']); $appEl = $this->appendNode($rootEl, 'app', ['appid' => $appId]); $this->appendNode($appEl, 'updatecheck', ['codebase' => $packageUrl, 'version' => $version]); return $document; } } $obj = new ChromeUpdateManifestGenerator; echo $obj->generate('abcdef', '1.2.3.4', 'http://foo.com/')->saveXML();

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.0070.01118.43
8.3.60.0090.00616.88
8.3.50.0140.00516.67
8.3.40.0130.00318.91
8.3.30.0040.01118.66
8.3.20.0000.00818.95
8.3.10.0060.00320.51
8.3.00.0060.00319.50
8.2.180.0130.00318.68
8.2.170.0070.00722.96
8.2.160.0080.00820.49
8.2.150.0060.00324.18
8.2.140.0070.00724.66
8.2.130.0070.00726.16
8.2.120.0040.00421.17
8.2.110.0000.00919.37
8.2.100.0030.00717.97
8.2.90.0000.00920.90
8.2.80.0040.00419.39
8.2.70.0030.00517.63
8.2.60.0080.00018.16
8.2.50.0000.00818.07
8.2.40.0050.00318.34
8.2.30.0040.00418.09
8.2.20.0000.00917.75
8.2.10.0040.00417.94
8.2.00.0040.00417.92
8.1.280.0150.00325.92
8.1.270.0120.00823.99
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0060.00323.87
8.1.230.0080.00321.06
8.1.220.0000.00818.77
8.1.210.0040.00418.97
8.1.200.0070.00317.48
8.1.190.0030.00517.76
8.1.180.0100.00518.10
8.1.170.0050.00318.96
8.1.160.0030.00519.02
8.1.150.0050.00318.76
8.1.140.0060.00317.57
8.1.130.0030.00317.92
8.1.120.0040.00417.48
8.1.110.0040.00717.58
8.1.100.0040.00417.60
8.1.90.0030.00517.54
8.1.80.0000.00817.62
8.1.70.0000.00717.62
8.1.60.0050.00317.72
8.1.50.0060.00317.62
8.1.40.0030.00617.66
8.1.30.0040.00417.62
8.1.20.0000.00817.67
8.1.10.0040.00417.60
8.1.00.0000.00817.61
8.0.300.0000.00720.08
8.0.290.0040.00417.00
8.0.280.0000.00818.43
8.0.270.0000.00717.43
8.0.260.0000.00617.00
8.0.250.0080.00017.03
8.0.240.0070.00317.07
8.0.230.0080.00017.12
8.0.220.0000.00716.96
8.0.210.0000.00816.99
8.0.200.0000.00717.00
8.0.190.0030.00617.04
8.0.180.0070.00016.95
8.0.170.0040.00716.90
8.0.160.0030.00517.07
8.0.150.0030.00616.99
8.0.140.0050.00517.00
8.0.130.0050.00013.54
8.0.120.0040.00416.96
8.0.110.0000.00717.14
8.0.100.0040.00416.95
8.0.90.0040.00417.09
8.0.80.0160.00617.05
8.0.70.0000.00717.14
8.0.60.0020.00516.85
8.0.50.0020.00516.94
8.0.30.0090.00917.40
8.0.20.0110.01017.21
8.0.10.0040.00417.23
8.0.00.0060.01716.98
7.4.330.0020.00213.02
7.4.320.0000.00616.65
7.4.300.0060.00016.73
7.4.290.0000.00716.68
7.4.280.0000.00716.63
7.4.270.0000.00716.66
7.4.260.0000.00513.38
7.4.250.0000.00816.68
7.4.240.0030.00316.52
7.4.230.0000.00716.53
7.4.220.0120.00616.55
7.4.210.0030.01616.66
7.4.200.0040.00416.71
7.4.190.0000.00716.82
7.4.160.0100.00716.73
7.4.150.0030.01516.51
7.4.140.0070.01016.80
7.4.130.0110.00816.61
7.4.120.0100.01316.71
7.4.110.0070.01016.62
7.4.100.0090.00916.51
7.4.90.0100.01016.81
7.4.80.0100.00719.39
7.4.70.0140.00616.63
7.4.60.0120.00916.78
7.4.50.0030.00716.57
7.4.40.0090.00616.80
7.4.30.0070.01016.77
7.4.00.0030.00915.29
7.3.330.0030.00313.39
7.3.320.0070.00013.49
7.3.310.0070.00016.50
7.3.300.0040.00416.52
7.3.290.0080.00616.51
7.3.280.0110.01116.54
7.3.270.0030.01316.54
7.3.260.0120.00616.77
7.3.250.0150.00316.65
7.3.240.0130.00416.70
7.3.230.0030.01316.75
7.3.210.0090.01516.55
7.3.200.0100.00716.52
7.3.190.0180.00016.47
7.3.180.0030.01316.46
7.3.170.0030.01316.57
7.3.160.0060.01216.32
7.3.120.0080.00614.74
7.3.00.0100.00316.63
7.2.330.0100.01016.88
7.2.320.0100.01016.84
7.2.310.0100.00716.67
7.2.300.0060.01116.68
7.2.290.0070.01016.89
7.2.130.0040.00716.75
7.2.120.0070.01016.96
7.2.110.0150.00316.69
7.2.100.0130.00616.86
7.2.90.0040.00716.75
7.2.80.0050.00516.66
7.2.70.0030.01317.06
7.2.60.0120.00216.94
7.2.50.0060.00917.14
7.2.40.0030.01016.81
7.2.30.0070.00716.80
7.2.20.0070.00717.00
7.2.10.0030.01216.88
7.2.00.0060.01118.10
7.1.250.0040.00715.72
7.1.240.0080.00615.84
7.1.230.0060.01015.74
7.1.220.0120.00915.51
7.1.210.0060.00615.82
7.1.200.0090.00515.61
7.1.190.0060.00915.93
7.1.180.0100.00715.71
7.1.170.0130.00315.71
7.1.160.0100.00015.70
7.1.150.0110.00415.60
7.1.140.0000.01115.82
7.1.130.0100.00615.80
7.1.120.0000.01415.84
7.1.110.0080.00515.71
7.1.100.0040.01217.16
7.1.90.0100.00315.78
7.1.80.0060.00615.80
7.1.70.0000.01116.60
7.1.60.0040.01517.62
7.1.50.0040.01616.45
7.1.40.0070.00715.55
7.1.30.0040.01115.96
7.1.20.0140.00315.58
7.1.10.0100.00315.73
7.1.00.0050.02819.01
7.0.330.0070.00715.24
7.0.320.0030.00915.11
7.0.310.0070.00715.11
7.0.300.0130.00015.52
7.0.290.0070.00315.34
7.0.280.0030.00615.36
7.0.270.0000.01115.40
7.0.260.0030.00615.39
7.0.250.0100.00715.56
7.0.240.0030.01315.16
7.0.230.0030.01215.34
7.0.220.0090.00615.05
7.0.210.0030.01015.07
7.0.200.0080.00216.12
7.0.190.0000.01415.48
7.0.180.0040.01115.50
7.0.170.0070.00315.45
7.0.160.0060.01015.43
7.0.150.0040.01115.43
7.0.140.0000.04318.46
7.0.130.0040.00715.39
7.0.120.0080.03818.69
7.0.110.0060.00315.46
7.0.100.0030.01015.43
7.0.90.0030.00915.48
7.0.80.0070.00715.36
7.0.70.0070.00715.22
7.0.60.0090.02917.48
7.0.50.0130.03516.69
7.0.40.0060.04515.57
7.0.30.0040.03515.55
7.0.20.0070.04515.59
7.0.10.0000.04915.55
7.0.00.0020.02715.57
5.6.380.0030.01013.92
5.6.370.0100.00314.00
5.6.360.0040.01114.21
5.6.350.0030.00914.18
5.6.340.0030.01313.85
5.6.330.0070.00714.04
5.6.320.0060.00614.07
5.6.310.0060.00613.99
5.6.300.0030.01313.90
5.6.290.0000.01513.94
5.6.280.0020.04417.64
5.6.270.0060.01014.02
5.6.260.0080.00814.41
5.6.250.0120.00614.00
5.6.240.0000.01414.12
5.6.230.0110.00414.06
5.6.220.0110.00414.11
5.6.210.0030.03017.47
5.6.200.0020.04916.04
5.6.190.0120.04316.06
5.6.180.0090.02516.08
5.6.170.0050.03016.11
5.6.160.0060.02016.11
5.6.150.0050.02615.99
5.6.140.0090.02016.20
5.6.130.0030.02515.92
5.6.120.0060.02216.20
5.6.110.0050.02516.04
5.6.100.0070.02016.08
5.6.90.0090.01816.01
5.6.80.0050.02315.64
5.6.70.0070.02015.84
5.6.60.0050.02015.77
5.6.50.0010.02715.84
5.6.40.0050.02315.72
5.6.30.0050.02115.90
5.6.20.0050.02215.61
5.6.10.0050.02015.72
5.6.00.0020.02515.78
5.5.380.0000.01111.18
5.5.370.0070.00311.18
5.5.360.0060.00311.18
5.5.350.0040.03715.76
5.5.340.0030.03414.58
5.5.330.0070.04514.56
5.5.320.0080.04014.56
5.5.310.0050.03014.58
5.5.300.0050.02214.58
5.5.290.0020.02614.57
5.5.280.0020.02414.60
5.5.270.0050.02014.54
5.5.260.0090.02014.63
5.5.250.0050.02514.54
5.5.240.0020.02314.24
5.5.230.0040.01814.27
5.5.220.0000.02414.29
5.5.210.0020.02214.32
5.5.200.0050.02014.28
5.5.190.0060.02014.29
5.5.180.0020.02314.29
5.5.170.0000.01111.18
5.5.160.0000.02514.31
5.5.150.0070.01814.28
5.5.140.0100.01714.25
5.5.130.0050.02014.30
5.5.120.0090.03514.25
5.5.110.0050.03514.23
5.5.100.0030.04114.18
5.5.90.0080.03914.19
5.5.80.0050.03914.17
5.5.70.0050.03814.18
5.5.60.0070.03914.18
5.5.50.0140.03114.23
5.5.40.0050.04414.20
5.5.30.0030.04414.21
5.5.20.0000.02614.21
5.5.10.0070.03014.20
5.5.00.0030.03614.23
5.4.450.0070.02015.26
5.4.440.0060.01915.32
5.4.430.0020.02215.25
5.4.420.0030.02315.24
5.4.410.0070.01915.25
5.4.400.0030.02015.13
5.4.390.0030.02215.11
5.4.380.0030.02015.22
5.4.370.0030.02215.05
5.4.360.0030.02115.08
5.4.350.0030.02315.15
5.4.340.0020.02215.07
5.4.330.0030.00311.18
5.4.320.0060.01715.11
5.4.310.0050.02115.10
5.4.300.0020.02315.08
5.4.290.0000.02515.15
5.4.280.0050.04115.11
5.4.270.0080.03715.09
5.4.260.0080.03715.11
5.4.250.0120.03715.15
5.4.240.0050.04015.04
5.4.230.0050.04015.15
5.4.220.0070.03815.15
5.4.210.0030.03215.15
5.4.200.0050.02615.11
5.4.190.0050.04015.11
5.4.180.0070.03715.21
5.4.170.0090.02715.10
5.4.160.0080.02715.10
5.4.150.0070.01915.10
5.4.140.0070.03213.80
5.4.130.0020.03113.70
5.4.120.0050.02113.74
5.4.110.0030.03813.79
5.4.100.0050.03513.81
5.4.90.0060.03313.71
5.4.80.0060.03913.80
5.4.70.0050.03313.80
5.4.60.0050.04013.82
5.4.50.0070.02813.82
5.4.40.0040.03813.89
5.4.30.0040.02813.81
5.4.20.0090.03513.86
5.4.10.0080.03313.81
5.4.00.0050.03613.52
5.3.290.0030.02112.90
5.3.280.0130.03012.90
5.3.270.0090.03512.89
5.3.260.0040.04413.00
5.3.250.0090.03312.87
5.3.240.0060.03512.90
5.3.230.0050.03712.79
5.3.220.0020.04412.88
5.3.210.0020.04212.89
5.3.200.0090.03812.80
5.3.190.0050.02712.89
5.3.180.0050.02512.79
5.3.170.0060.04112.93
5.3.160.0050.03812.92
5.3.150.0060.03612.80
5.3.140.0130.03512.87
5.3.130.0030.04012.88
5.3.120.0080.02212.88
5.3.110.0020.04512.86
5.3.100.0050.02712.61
5.3.90.0030.02312.59
5.3.80.0060.03812.63
5.3.70.0070.03912.62
5.3.60.0050.04012.61
5.3.50.0080.03512.58
5.3.40.0020.03812.49
5.3.30.0070.03612.57
5.3.20.0030.03112.36
5.3.10.0030.03212.43
5.3.00.0080.02512.51
5.2.170.0050.02211.16
5.2.160.0020.03511.19
5.2.150.0030.03511.16
5.2.140.0070.03211.18
5.2.130.0050.02211.16
5.2.120.0080.02311.19
5.2.110.0020.02111.16
5.2.100.0030.02211.16
5.2.90.0080.02511.16
5.2.80.0020.02411.16
5.2.70.0070.03211.16
5.2.60.0030.03011.16
5.2.50.0030.01811.16
5.2.40.0050.01711.16
5.2.30.0080.03011.16
5.2.20.0070.03111.16
5.2.10.0080.02311.16
5.2.00.0020.02311.16
5.1.60.0000.01711.16
5.1.50.0020.02411.16
5.1.40.0050.02711.16
5.1.30.0030.02411.16
5.1.20.0020.02711.16
5.1.10.0000.02911.16
5.1.00.0050.02711.16
5.0.50.0030.02311.16
5.0.40.0000.02711.16
5.0.30.0050.02711.16
5.0.20.0030.01911.16
5.0.10.0030.01811.16
5.0.00.0030.03511.16
4.4.90.0070.01511.16
4.4.80.0000.01211.16
4.4.70.0030.01411.16
4.4.60.0050.01211.16
4.4.50.0050.01611.16
4.4.40.0020.02011.16
4.4.30.0060.01611.16
4.4.20.0020.01811.16
4.4.10.0010.01511.16
4.4.00.0030.02911.16
4.3.110.0000.01911.16
4.3.100.0070.01311.16
4.3.90.0030.01911.16
4.3.80.0000.02511.16
4.3.70.0000.01811.16
4.3.60.0030.01511.16
4.3.50.0000.01711.16
4.3.40.0000.02511.16
4.3.30.0010.02011.16
4.3.20.0030.01611.16
4.3.10.0020.01511.16
4.3.00.0020.01211.16

preferences:
65.59 ms | 401 KiB | 5 Q