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($string); $xml->registerXPathNamespace('svg', 'http://www.w3.org/2000/svg'); $xml->xpath('//svg:svg')[0]->asXML('php://output');

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.0000.01418.55
8.3.50.0090.00822.17
8.3.40.0110.00419.10
8.3.30.0100.01019.06
8.3.20.0050.00319.29
8.3.10.0000.00821.33
8.3.00.0060.00323.98
8.2.180.0070.00718.79
8.2.170.0040.01122.96
8.2.160.0000.01520.89
8.2.150.0130.00624.18
8.2.140.0050.00324.66
8.2.130.0110.00026.16
8.2.120.0040.00421.63
8.2.110.0000.00922.62
8.2.100.0080.00418.22
8.2.90.0000.00819.65
8.2.80.0000.00819.74
8.2.70.0040.00418.00
8.2.60.0040.00418.30
8.2.50.0000.00818.07
8.2.40.0050.00318.59
8.2.30.0040.00419.77
8.2.20.0020.00518.07
8.2.10.0060.00318.07
8.2.00.0070.00318.04
8.1.280.0100.00725.92
8.1.270.0030.00623.99
8.1.260.0120.00626.35
8.1.250.0030.00628.09
8.1.240.0110.00021.14
8.1.230.0090.00321.32
8.1.220.0040.00418.77
8.1.210.0000.00919.15
8.1.200.0000.01017.48
8.1.190.0060.00317.91
8.1.180.0060.00318.10
8.1.170.0070.00018.91
8.1.160.0040.00419.36
8.1.150.0030.00718.92
8.1.140.0030.00517.87
8.1.130.0000.00718.16
8.1.120.0000.00817.84
8.1.110.0000.00817.87
8.1.100.0040.00417.62
8.1.90.0070.00017.86
8.1.80.0080.00017.89
8.1.70.0030.00317.82
8.1.60.0060.00318.01
8.1.50.0050.00317.91
8.1.40.0000.00817.91
8.1.30.0030.00618.01
8.1.20.0030.00617.83
8.1.10.0040.00417.85
8.1.00.0000.00717.96
8.0.300.0000.00720.45
8.0.290.0000.00717.54
8.0.280.0050.00318.80
8.0.270.0030.00317.61
8.0.260.0070.00017.17
8.0.250.0040.00417.43
8.0.240.0000.00817.39
8.0.230.0040.00417.44
8.0.220.0000.00917.35
8.0.210.0030.00317.24
8.0.200.0070.00017.24
8.0.190.0030.00517.18
8.0.180.0050.00317.40
8.0.170.0000.00717.41
8.0.160.0040.00417.31
8.0.150.0040.00417.36
8.0.140.0040.00317.34
8.0.130.0030.00313.66
8.0.120.0030.00617.18
8.0.110.0040.00417.28
8.0.100.0040.00417.34
8.0.90.0050.00317.12
8.0.80.0060.00917.36
8.0.70.0050.00317.28
8.0.60.0000.00717.18
8.0.50.0000.00917.29
8.0.30.0090.01117.24
8.0.20.0150.00817.40
8.0.10.0000.00717.35
8.0.00.0090.00917.19
7.4.330.0050.00017.28
7.4.320.0070.00016.89
7.4.300.0000.00716.88
7.4.290.0000.00716.90
7.4.280.0070.00316.86
7.4.270.0050.00216.87
7.4.260.0060.00013.66
7.4.250.0030.00516.64
7.4.240.0030.00317.04
7.4.230.0050.00216.79
7.4.220.0110.00716.83
7.4.210.0070.01016.92
7.4.200.0080.00016.95
7.4.190.0050.00316.98
7.4.160.0030.01316.95
7.4.150.0090.00917.40
7.4.140.0080.01217.86
7.4.130.0090.00716.93
7.4.120.0110.00816.93
7.4.110.0130.00317.02
7.4.100.0130.01016.84
7.4.90.0160.00916.92
7.4.80.0170.00019.39
7.4.70.0050.01316.89
7.4.60.0000.01616.60
7.4.50.0000.00816.90
7.4.40.0090.00622.77
7.4.30.0100.01316.90
7.4.00.0030.01314.97
7.3.330.0000.00513.31
7.3.320.0030.00313.57
7.3.310.0000.00716.61
7.3.300.0030.00316.57
7.3.290.0080.00616.69
7.3.280.0080.01016.71
7.3.270.0160.00717.40
7.3.260.0140.00818.24
7.3.250.0070.01016.64
7.3.240.0120.00916.79
7.3.230.0100.01316.77
7.3.210.0130.00316.86
7.3.200.0080.01219.39
7.3.190.0150.00416.87
7.3.180.0080.00816.62
7.3.170.0080.00816.90
7.3.160.0130.00316.75
7.3.120.0060.01215.16
7.3.110.0060.01214.81
7.3.100.0080.00814.82
7.3.90.0070.00315.02
7.3.80.0070.00714.98
7.3.70.0060.00314.91
7.3.60.0030.00714.96
7.3.50.0030.00614.94
7.3.40.0060.00315.03
7.3.30.0120.00415.15
7.3.20.0060.00616.74
7.3.10.0000.00916.72
7.3.00.0060.00616.52
7.2.330.0100.00716.73
7.2.320.0090.01116.75
7.2.310.0130.00716.66
7.2.300.0070.01017.13
7.2.290.0100.00717.04
7.2.240.0070.01115.30
7.2.230.0030.01015.02
7.2.220.0000.01115.03
7.2.210.0080.00815.42
7.2.200.0090.00915.23
7.2.190.0090.00615.01
7.2.180.0060.00914.88
7.2.170.0060.00615.12
7.2.160.0110.00715.28
7.2.150.0030.00916.71
7.2.140.0000.01317.00
7.2.130.0030.01617.12
7.2.120.0100.00316.77
7.2.110.0000.01016.66
7.2.100.0070.00716.91
7.2.90.0090.00317.07
7.2.80.0030.01216.85
7.2.70.0000.01017.08
7.2.60.0090.00516.90
7.2.50.0040.01416.97
7.2.40.0070.00716.94
7.2.30.0060.01017.13
7.2.20.0070.01116.84
7.2.10.0030.01316.93
7.2.00.0070.01017.05
7.1.330.0140.00315.79
7.1.320.0100.00015.89
7.1.310.0040.01115.83
7.1.300.0100.00315.80
7.1.290.0030.00615.84
7.1.280.0070.00716.16
7.1.270.0090.00615.92
7.1.260.0090.00615.85
7.1.250.0110.00815.88
7.1.200.0130.00315.78
7.1.70.0070.00017.22
7.1.60.0110.00017.40
7.1.50.0000.01216.91
7.1.00.0000.05322.56
7.0.200.0070.01016.66
7.0.140.0170.06022.18
7.0.100.0130.07320.17
7.0.90.0230.07020.16
7.0.80.0370.07020.07
7.0.70.0230.07020.14
7.0.60.0270.04020.15
7.0.50.0130.06020.46
7.0.40.0100.07720.30
7.0.30.0100.08020.30
7.0.20.0070.08720.31
7.0.10.0100.04320.27
7.0.00.0130.07720.26
5.6.280.0000.05321.09
5.6.250.0100.04020.75
5.6.240.0170.07020.73
5.6.230.0130.07720.71
5.6.220.0030.08320.80
5.6.210.0100.07720.84
5.6.200.0070.08021.21
5.6.190.0000.08721.31
5.6.180.0030.06021.21
5.6.170.0070.07721.24
5.6.160.0030.06021.24
5.6.150.0030.05021.22
5.6.140.0130.08321.23
5.6.130.0230.07321.14
5.6.120.0100.08321.25
5.6.110.0030.05021.12
5.6.100.0130.07321.22
5.6.90.0130.08321.31
5.6.80.0030.07320.70
5.6.70.0070.08320.70
5.6.60.0130.07020.61
5.6.50.0100.07020.66
5.6.40.0030.07320.50
5.6.30.0130.07320.61
5.6.20.0130.06020.52
5.6.10.0100.07320.71
5.6.00.0070.07720.61
5.5.380.0100.04320.54
5.5.370.0030.05020.81
5.5.360.0000.08720.57
5.5.350.0030.08720.66
5.5.340.0000.07321.13
5.5.330.0070.07721.03
5.5.320.0070.05721.03
5.5.310.0170.06020.98
5.5.300.0100.07721.01
5.5.290.0000.08021.05
5.5.280.0130.06321.13
5.5.270.0100.07320.94
5.5.260.0100.07720.99
5.5.250.0070.08320.86
5.5.240.0030.04320.32
5.5.230.0070.07020.34
5.5.220.0130.08020.40
5.5.210.0030.07020.39
5.5.200.0070.08320.38
5.5.190.0100.07320.46
5.5.180.0200.06320.38
5.5.160.0130.06320.37
5.5.150.0070.09720.30
5.5.140.0070.05320.39
5.5.130.0030.04720.30
5.5.120.0100.03320.38
5.5.110.0030.04720.35
5.5.100.0070.06720.17
5.5.90.0000.04020.25
5.5.80.0100.03020.37
5.5.70.0030.04020.16
5.5.60.0000.04020.32
5.5.50.0000.04320.27
5.5.40.0000.04320.28
5.5.30.0070.03320.34
5.5.20.0070.05020.23
5.5.10.0030.04020.31
5.5.00.0030.06020.27
5.4.450.0070.08019.54
5.4.440.0130.05719.55
5.4.430.0070.08319.57
5.4.420.0130.06319.35
5.4.410.0000.06319.39
5.4.400.0030.05019.19
5.4.390.0100.04719.26
5.4.380.0070.04319.03
5.4.370.0200.03719.20
5.4.360.0030.07719.27
5.4.350.0170.07019.19
5.4.340.0070.05719.24
5.4.320.0070.04319.10
5.4.310.0070.07719.29
5.4.300.0130.06319.03
5.4.290.0100.07019.46
5.4.280.0170.04319.24
5.4.270.0030.03719.27
5.4.260.0130.02719.25
5.4.250.0000.04719.32
5.4.240.0030.03719.00
5.4.230.0070.04019.29
5.4.220.0030.03719.09
5.4.210.0070.03319.18
5.4.200.0000.04019.09
5.4.190.0130.02719.18
5.4.180.0030.03319.21
5.4.170.0070.06319.22
5.4.160.0030.06319.25
5.4.150.0030.04719.28
5.4.140.0070.03716.49
5.4.130.0030.08016.45
5.4.120.0030.05316.53
5.4.110.0030.03716.62
5.4.100.0100.02716.53
5.4.90.0000.04016.43
5.4.80.0030.05016.55
5.4.70.0100.03316.42
5.4.60.0030.03716.49
5.4.50.0030.03716.66
5.4.40.0100.03316.69
5.4.30.0030.03016.44
5.4.20.0070.03716.59
5.4.10.0030.03016.40
5.4.00.0070.03015.89
5.3.290.0170.06314.53
5.3.280.0070.03314.55
5.3.270.0000.04314.44
5.3.260.0030.07714.44
5.3.250.0070.06714.58
5.3.240.0070.02714.46
5.3.230.0030.03314.57
5.3.220.0130.02714.39
5.3.210.0100.04714.43
5.3.200.0100.04714.54
5.3.190.0000.04014.41
5.3.180.0030.03714.43
5.3.170.0070.03314.38
5.3.160.0030.03714.43
5.3.150.0000.04014.56
5.3.140.0000.03714.54
5.3.130.0000.04014.41
5.3.120.0100.03014.38
5.3.110.0000.04314.55
5.3.100.0070.03714.02
5.3.90.0070.03314.03
5.3.80.0130.02314.01
5.3.70.0070.03313.93
5.3.60.0000.03714.01
5.3.50.0030.04713.72
5.3.40.0030.03713.72
5.3.30.0070.02713.67
5.3.20.0000.04013.62
5.3.10.0000.03313.62
5.3.00.0100.03313.61
5.2.170.0030.02311.23
5.2.160.0030.02710.98
5.2.150.0030.03011.16
5.2.140.0000.02711.13
5.2.130.0030.02710.96
5.2.120.0100.02011.09
5.2.110.0070.02310.91
5.2.100.0070.02311.02
5.2.90.0000.03011.12
5.2.80.0030.02711.01
5.2.70.0000.03010.91
5.2.60.0130.02010.89
5.2.50.0030.02710.86
5.2.40.0030.02711.06
5.2.30.0000.03310.99
5.2.20.0000.02711.00
5.2.10.0000.03310.92
5.2.00.0000.02710.79
5.1.60.0000.02310.09
5.1.50.0130.01710.07
5.1.40.0130.0439.88
5.1.30.0070.05310.45
5.1.20.0030.05310.48
5.1.10.0070.0539.97
5.1.00.0070.05010.13
5.0.50.0070.0279.65
5.0.40.0030.0479.65
5.0.30.0030.0609.65
5.0.20.0030.0479.65
5.0.10.0100.0239.65
5.0.00.0000.0679.65
4.4.90.0000.0179.65
4.4.80.0000.0179.65
4.4.70.0000.0179.65
4.4.60.0000.0179.65
4.4.50.0000.0139.65
4.4.40.0000.0279.65
4.4.30.0030.0279.65
4.4.20.0070.0279.65
4.4.10.0000.0379.65
4.4.00.0000.0539.65
4.3.110.0000.0379.65
4.3.100.0000.0279.65
4.3.90.0070.0309.65
4.3.80.0070.0479.65
4.3.70.0000.0379.65
4.3.60.0100.0279.65
4.3.50.0070.0309.65
4.3.40.0130.0209.65
4.3.30.0000.0379.65
4.3.20.0000.0309.65
4.3.10.0030.0309.65
4.3.00.0030.0339.65

preferences:
48.34 ms | 401 KiB | 5 Q