3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * How to get SVG tag content with PHP * @link http://stackoverflow.com/a/16234458/367456 */ $string = <<<BUFFER <?xml version="1.0" encoding="utf-8"?> <!-- comment --> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="202.5px" height="226.084px" viewBox="0 0 202.5 226.084" enable-background="new 0 0 202.5 226.084" xml:space="preserve"> <g> <path d="M0,13.628c47.7940,13.628z"/> <polygon points="108.48,207.874 145.506,196.948 145.506,204.536 108.48,214.854 "/> <path fill="none" stroke="#000000" d="M114.55,223.959"/> </g> </svg> BUFFER; $xml = simplexml_load_string('<polygon points="108.48,207.874 145.506,196.948 145.506,204.536 108.48,214.854 "/>'); $xml->registerXPathNamespace('svg', 'http://www.w3.org/2000/svg'); $xml->addAttribute('type', 'documentary'); $xml->asXML('php://output'); print_r($xml);

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.0030.01218.68
8.3.50.0100.00822.23
8.3.40.0120.00318.97
8.3.30.0100.00319.29
8.3.20.0080.00020.65
8.3.10.0040.00422.27
8.3.00.0000.00822.82
8.2.180.0090.00616.88
8.2.170.0090.00622.96
8.2.160.0100.00319.45
8.2.150.0090.00624.18
8.2.140.0060.00324.66
8.2.130.0070.00726.16
8.2.120.0080.00019.61
8.2.110.0100.00721.02
8.2.100.0120.00018.16
8.2.90.0000.00819.46
8.2.80.0040.00418.16
8.2.70.0000.00817.75
8.2.60.0040.00418.41
8.2.50.0080.00518.07
8.2.40.0040.00420.25
8.2.30.0050.00218.48
8.2.20.0000.00918.00
8.2.10.0000.00718.02
8.2.00.0030.00619.80
8.1.280.0140.00325.92
8.1.270.0080.00022.47
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00324.07
8.1.230.0040.00721.33
8.1.220.0040.00418.03
8.1.210.0040.00418.77
8.1.200.0060.00317.60
8.1.190.0030.00517.66
8.1.180.0060.00319.08
8.1.170.0040.00418.98
8.1.160.0070.00022.59
8.1.150.0030.00518.95
8.1.140.0020.00517.73
8.1.130.0030.00418.21
8.1.120.0050.00317.64
8.1.110.0000.00817.70
8.1.100.0030.00617.65
8.1.90.0040.00417.62
8.1.80.0000.00717.70
8.1.70.0070.00017.63
8.1.60.0030.00617.89
8.1.50.0070.00017.95
8.1.40.0000.00817.68
8.1.30.0030.00517.80
8.1.20.0040.00417.94
8.1.10.0000.00717.82
8.1.00.0030.00617.89
8.0.300.0080.00018.77
8.0.290.0040.00417.41
8.0.280.0070.00018.79
8.0.270.0070.00017.25
8.0.260.0040.00417.16
8.0.250.0030.00317.46
8.0.240.0030.00317.42
8.0.230.0050.00217.33
8.0.220.0070.00017.25
8.0.210.0000.00717.11
8.0.200.0040.00417.32
8.0.190.0030.00317.33
8.0.180.0040.00417.14
8.0.170.0080.00017.38
8.0.160.0070.00017.17
8.0.150.0030.00317.10
8.0.140.0030.00517.34
8.0.130.0050.00013.59
8.0.120.0050.00317.11
8.0.110.0040.00417.37
8.0.100.0000.00717.36
8.0.90.0000.00717.29
8.0.80.0070.00717.24
8.0.70.0000.00717.28
8.0.60.0040.00417.30
8.0.50.0040.00417.38
8.0.30.0110.01117.40
8.0.20.0100.00917.40
8.0.10.0030.00517.18
8.0.00.0030.01717.00
7.4.330.0000.00515.43
7.4.320.0030.00316.99
7.4.300.0060.00016.85
7.4.290.0040.00416.90
7.4.280.0070.00016.85
7.4.270.0040.00416.93
7.4.260.0000.00716.91
7.4.250.0040.00416.91
7.4.240.0020.00616.85
7.4.230.0050.00216.87
7.4.220.0090.00916.98
7.4.210.0070.01016.89
7.4.200.0000.00716.85
7.4.190.0070.00016.75
7.4.160.0090.00616.78
7.4.150.0090.00917.40
7.4.140.0090.00917.86
7.4.130.0100.00716.84
7.4.120.0050.01216.80
7.4.110.0120.00617.05
7.4.100.0100.00716.84
7.4.90.0100.01016.88
7.4.80.0070.01519.39
7.4.70.0090.00916.93
7.4.60.0090.00916.70
7.4.50.0000.00916.91
7.4.40.0040.01122.77
7.4.30.0120.00916.87
7.4.00.0070.01115.11
7.3.330.0000.00513.34
7.3.320.0060.00013.52
7.3.310.0000.00716.73
7.3.300.0030.00316.62
7.3.290.0110.00316.52
7.3.280.0130.00216.59
7.3.270.0030.01317.40
7.3.260.0140.00316.59
7.3.250.0070.01116.58
7.3.240.0110.01116.49
7.3.230.0040.01316.49
7.3.210.0120.00316.56
7.3.200.0090.00919.39
7.3.190.0100.00716.78
7.3.180.0030.01316.53
7.3.170.0080.00816.77
7.3.160.0100.00516.50
7.3.120.0070.00714.86
7.2.330.0090.00916.79
7.2.320.0080.00916.75
7.2.310.0210.00316.77
7.2.300.0070.01016.66
7.2.290.0090.00916.87
7.2.00.0100.00319.62
7.1.100.0000.01318.45
7.1.70.0080.00417.40
7.1.60.0000.02419.82
7.1.50.0100.01016.83
7.1.00.0130.06722.62
7.0.200.0160.00616.65
7.0.140.0030.07322.19
7.0.100.0200.06020.32
7.0.90.0000.09720.12
7.0.80.0070.08020.15
7.0.70.0030.08320.24
7.0.60.0000.09720.19
7.0.50.0130.08020.56
7.0.40.0130.07720.35
7.0.30.0170.08020.27
7.0.20.0070.08320.26
7.0.10.0200.07320.28
7.0.00.0030.08320.34
5.6.280.0000.07721.23
5.6.250.0130.07720.78
5.6.240.0070.07720.78
5.6.230.0130.07320.88
5.6.220.0000.06020.94
5.6.210.0000.07720.84
5.6.200.0070.08721.28
5.6.190.0000.06321.14
5.6.180.0100.08021.21
5.6.170.0030.08021.21
5.6.160.0100.06721.23
5.6.150.0100.07721.29
5.6.140.0170.06721.25
5.6.130.0100.08321.13
5.6.120.0230.07021.29
5.6.110.0030.05721.28
5.6.100.0070.08321.13
5.6.90.0100.08021.23
5.6.80.0170.06720.57
5.6.70.0130.07320.57
5.6.60.0070.04720.59
5.6.50.0030.08720.59
5.6.40.0070.08720.68
5.6.30.0130.07020.59
5.6.20.0030.05720.55
5.6.10.0100.08320.52
5.6.00.0170.07020.54
5.5.380.0000.05720.53
5.5.370.0070.05720.54
5.5.360.0030.08020.59
5.5.350.0100.06720.56
5.5.340.0170.06320.92
5.5.330.0170.03021.01
5.5.320.0030.08321.03
5.5.310.0130.08020.95
5.5.300.0030.08021.07
5.5.290.0100.05020.95
5.5.280.0200.07020.93
5.5.270.0070.08321.03
5.5.260.0030.08720.94
5.5.250.0200.07320.82
5.5.240.0100.04020.37
5.5.230.0100.07720.32
5.5.220.0070.07720.29
5.5.210.0030.05320.36
5.5.200.0100.07020.30
5.5.190.0030.08320.34
5.5.180.0100.07720.35
5.5.160.0170.04020.46
5.5.150.0070.07020.32
5.5.140.0000.07320.26
5.5.130.0100.07720.35
5.5.120.0130.06020.28
5.5.110.0100.07720.41
5.5.100.0100.08320.25
5.5.90.0070.07720.25
5.5.80.0100.04320.30
5.5.70.0130.06720.27
5.5.60.0100.07320.23
5.5.50.0030.08020.18
5.5.40.0100.07320.23
5.5.30.0030.05320.18
5.5.20.0070.07720.33
5.5.10.0100.07320.21
5.5.00.0030.07720.28
5.4.450.0100.07719.35
5.4.440.0070.05319.52
5.4.430.0070.06719.55
5.4.420.0070.08019.56
5.4.410.0170.03719.22
5.4.400.0130.03019.24
5.4.390.0030.08019.25
5.4.380.0070.07719.24
5.4.370.0100.07019.20
5.4.360.0030.07719.29
5.4.350.0030.08019.30
5.4.340.0170.06719.00
5.4.320.0170.06319.25
5.4.310.0070.03719.23
5.4.300.0130.07019.29
5.4.290.0070.04719.23
5.4.280.0070.04719.22
5.4.270.0170.07018.99
5.4.260.0030.08319.44
5.4.250.0100.06319.29
5.4.240.0100.07719.28
5.4.230.0030.07719.18
5.4.220.0030.07719.23
5.4.210.0100.06719.42
5.4.200.0000.08319.16
5.4.190.0200.05718.98
5.4.180.0100.06319.08
5.4.170.0100.07319.23
5.4.160.0030.08019.24
5.4.150.0030.05019.16
5.4.140.0030.03716.49
5.4.130.0100.03716.47
5.4.120.0070.04316.36
5.4.110.0100.03716.43
5.4.100.0100.03016.52
5.4.90.0100.03016.43
5.4.80.0030.05016.45
5.4.70.0000.03716.50
5.4.60.0000.04016.34
5.4.50.0100.07016.43
5.4.40.0100.06316.44
5.4.30.0030.04316.32
5.4.20.0000.04316.36
5.4.10.0100.06316.40
5.4.00.0070.03315.95
5.3.290.0070.07314.87
5.3.280.0100.07714.64
5.3.270.0130.06314.73
5.3.260.0070.07714.81
5.3.250.0130.07014.63
5.3.240.0000.04014.73
5.3.230.0030.04314.73
5.3.220.0000.04314.78
5.3.210.0030.03714.64
5.3.200.0100.03014.57
5.3.190.0100.07714.71
5.3.180.0070.03714.73
5.3.170.0030.04014.68
5.3.160.0030.03714.67
5.3.150.0030.03714.70
5.3.140.0030.03714.78
5.3.130.0030.06714.74
5.3.120.0100.03014.76
5.3.110.0030.05314.70
5.3.100.0000.04014.20
5.3.90.0030.03714.21
5.3.80.0100.03014.13
5.3.70.0030.03714.14
5.3.60.0000.04014.18
5.3.50.0030.03313.94
5.3.40.0070.03314.11
5.3.30.0000.03714.03
5.3.20.0030.03313.83
5.3.10.0070.03013.79
5.3.00.0030.03713.85
5.2.170.0000.03311.42
5.2.160.0000.03311.35
5.2.150.0000.03011.39
5.2.140.0000.03011.28
5.2.130.0000.03011.23
5.2.120.0000.03011.37
5.2.110.0030.02711.24
5.2.100.0000.03011.22
5.2.90.0000.03011.30
5.2.80.0000.03011.36
5.2.70.0030.03011.21
5.2.60.0000.03011.31
5.2.50.0000.03011.17
5.2.40.0070.02311.02
5.2.30.0100.02011.17
5.2.20.0030.02711.09
5.2.10.0030.02711.14
5.2.00.0000.03010.91
5.1.60.0000.02710.25
5.1.50.0000.02310.22
5.1.40.0070.02010.31
5.1.30.0000.02710.68
5.1.20.0000.02710.58
5.1.10.0000.02710.36
5.1.00.0030.02310.28
5.0.50.0030.02310.19
5.0.40.0070.01310.19
5.0.30.0030.02310.19
5.0.20.0070.01310.19
5.0.10.0000.02010.19
5.0.00.0030.02710.19
4.4.90.0000.01710.19
4.4.80.0030.01010.19
4.4.70.0030.01310.19
4.4.60.0030.01310.19
4.4.50.0030.01310.19
4.4.40.0000.02310.19
4.4.30.0030.01310.19
4.4.20.0000.01710.19
4.4.10.0000.01710.19
4.4.00.0100.01310.19
4.3.110.0000.02010.19
4.3.100.0000.01310.19
4.3.90.0000.01710.19
4.3.80.0030.02310.19
4.3.70.0000.01710.19
4.3.60.0000.01710.19
4.3.50.0070.03310.19
4.3.40.0030.05010.19
4.3.30.0030.02710.19
4.3.20.0030.03010.19
4.3.10.0000.01710.19
4.3.00.0000.03710.19

preferences:
40.45 ms | 401 KiB | 5 Q