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/svg:g/svg:path')[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.0130.00616.88
8.3.50.0090.00922.24
8.3.40.0070.00719.27
8.3.30.0070.00719.32
8.3.20.0040.00420.65
8.3.10.0040.00423.98
8.3.00.0050.00321.34
8.2.180.0040.01516.88
8.2.170.0110.01122.96
8.2.160.0100.00320.90
8.2.150.0040.00424.18
8.2.140.0070.00024.66
8.2.130.0070.01126.16
8.2.120.0040.00421.24
8.2.110.0000.00922.70
8.2.100.0110.00018.22
8.2.90.0040.00419.48
8.2.80.0000.00917.97
8.2.70.0080.00018.00
8.2.60.0030.00518.30
8.2.50.0000.00818.07
8.2.40.0090.00318.29
8.2.30.0060.00318.53
8.2.20.0080.00018.09
8.2.10.0030.00518.42
8.2.00.0040.00418.11
8.1.280.0150.00725.92
8.1.270.0090.00022.43
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00624.09
8.1.230.0060.00619.46
8.1.220.0060.00317.93
8.1.210.0050.00318.77
8.1.200.0030.00617.59
8.1.190.0000.00917.61
8.1.180.0040.00418.10
8.1.170.0050.00318.90
8.1.160.0040.00422.36
8.1.150.0080.00018.91
8.1.140.0030.00517.81
8.1.130.0030.00318.19
8.1.120.0040.00417.91
8.1.110.0020.00517.66
8.1.100.0030.00517.72
8.1.90.0070.00017.76
8.1.80.0040.00417.61
8.1.70.0030.00317.74
8.1.60.0000.00717.93
8.1.50.0030.00617.90
8.1.40.0060.00317.75
8.1.30.0030.00517.89
8.1.20.0050.00318.05
8.1.10.0000.00718.00
8.1.00.0000.00817.71
8.0.300.0080.00018.77
8.0.290.0050.00217.43
8.0.280.0070.00018.74
8.0.270.0000.00817.67
8.0.260.0030.00317.53
8.0.250.0070.00017.33
8.0.240.0030.00317.42
8.0.230.0070.00017.22
8.0.220.0070.00017.24
8.0.210.0000.00817.05
8.0.200.0030.00317.41
8.0.190.0070.00017.43
8.0.180.0070.00017.30
8.0.170.0080.00017.35
8.0.160.0070.00017.37
8.0.150.0000.00917.33
8.0.140.0080.00017.17
8.0.130.0000.00813.70
8.0.120.0040.00417.22
8.0.110.0050.00317.38
8.0.100.0040.00417.25
8.0.90.0040.00417.14
8.0.80.0040.01217.27
8.0.70.0040.00417.22
8.0.60.0040.00417.22
8.0.50.0040.00417.25
8.0.30.0090.00917.36
8.0.20.0140.01217.52
8.0.10.0000.00717.45
8.0.00.0080.01117.10
7.4.330.0000.00515.32
7.4.320.0030.00316.99
7.4.300.0050.00216.93
7.4.290.0070.00016.88
7.4.280.0000.00916.92
7.4.270.0030.00316.73
7.4.260.0030.00316.77
7.4.250.0000.00716.88
7.4.240.0000.00716.85
7.4.230.0000.00716.72
7.4.220.0040.01416.88
7.4.210.0100.00716.89
7.4.200.0000.00817.04
7.4.160.0130.00316.80
7.4.150.0190.00017.40
7.4.140.0070.01117.86
7.4.130.0120.00416.76
7.4.120.0080.00916.78
7.4.110.0100.01016.85
7.4.100.0100.00716.88
7.4.90.0170.00017.14
7.4.80.0130.01019.39
7.4.70.0100.00616.79
7.4.60.0090.01016.98
7.4.50.0040.00416.91
7.4.40.0070.01016.96
7.4.30.0030.01317.02
7.4.00.0070.01115.21
7.3.330.0080.00013.49
7.3.320.0020.00213.30
7.3.310.0040.00416.61
7.3.300.0000.00716.52
7.3.290.0180.00016.67
7.3.280.0110.00616.70
7.3.270.0070.01117.40
7.3.260.0280.03116.55
7.3.250.0050.01316.83
7.3.240.0140.00417.10
7.3.230.0120.00816.81
7.3.210.0060.01016.93
7.3.200.0100.00719.39
7.3.190.0060.01116.77
7.3.180.0120.00416.82
7.3.170.0120.00916.76
7.3.160.0030.01316.78
7.3.120.0080.00914.93
7.3.110.0070.01114.87
7.3.100.0060.01014.97
7.3.90.0060.00615.00
7.3.80.0070.00714.85
7.3.70.0060.00314.95
7.3.60.0030.01314.86
7.3.50.0000.01614.91
7.3.40.0030.00914.79
7.3.30.0000.01614.82
7.3.20.0090.00616.72
7.3.10.0060.00716.65
7.3.00.0060.00816.77
7.2.330.0100.00716.78
7.2.320.0080.01417.17
7.2.310.0040.01517.09
7.2.300.0110.00616.74
7.2.290.0070.01017.00
7.2.250.0000.01815.10
7.2.240.0070.01314.90
7.2.230.0130.00615.11
7.2.220.0040.00815.03
7.2.210.0120.00314.91
7.2.200.0060.01015.28
7.2.190.0110.00415.14
7.2.180.0080.00815.18
7.2.170.0070.00415.17
7.2.130.0060.00916.85
7.2.120.0030.01016.69
7.2.110.0040.00716.95
7.2.100.0040.01116.92
7.2.90.0040.01116.92
7.2.80.0060.00616.84
7.2.70.0050.00616.84
7.2.60.0030.01116.80
7.2.50.0060.01317.02
7.2.40.0150.00316.83
7.2.30.0040.01516.95
7.2.20.0070.00316.93
7.2.10.0060.00916.84
7.2.00.0020.01118.32
7.1.330.0110.00315.98
7.1.320.0070.00716.01
7.1.310.0070.00715.87
7.1.300.0100.00615.79
7.1.290.0070.00715.83
7.1.280.0030.00616.12
7.1.270.0090.00616.17
7.1.260.0060.01015.77
7.1.250.0000.01115.94
7.1.100.0060.00618.31
7.1.70.0080.00417.13
7.1.60.0060.01919.70
7.1.50.0140.01116.72
7.1.00.0070.07322.62
7.0.200.0020.00516.72
7.0.140.0000.07322.18
7.0.80.0030.04321.87
7.0.70.0070.08021.87
7.0.60.0000.08721.93
7.0.50.0030.05322.24
7.0.40.0070.08320.27
7.0.30.0100.05320.26
7.0.20.0030.08720.28
7.0.10.0100.04720.27
7.0.00.0030.07720.22
5.6.280.0100.06721.13
5.6.230.0030.08720.75
5.6.220.0100.05020.73
5.6.210.0070.08020.70
5.6.200.0070.08021.13
5.6.190.0100.08321.19
5.6.180.0070.07721.21
5.6.170.0070.05021.20
5.6.160.0130.06321.20
5.6.150.0070.05321.10
5.6.140.0130.08021.35
5.6.130.0030.06321.20
5.6.120.0000.06321.18
5.6.110.0030.05721.20
5.6.100.0030.06721.34
5.6.90.0130.08321.30
5.6.80.0100.07320.65
5.6.70.0200.07320.64
5.6.60.0030.04320.68
5.6.50.0030.04020.53
5.6.40.0030.08720.50
5.6.30.0030.08720.62
5.6.20.0170.07020.59
5.6.10.0100.07720.58
5.6.00.0070.07720.47
5.5.370.0030.08320.54
5.5.360.0100.07320.65
5.5.350.0070.05720.67
5.5.340.0100.08021.10
5.5.330.0170.05321.09
5.5.320.0000.05020.93
5.5.310.0070.07020.94
5.5.300.0070.06320.94
5.5.290.0030.05020.96
5.5.280.0100.05320.98
5.5.270.0130.07721.02
5.5.260.0030.05320.91
5.5.250.0070.08720.86
5.5.240.0030.08320.39
5.5.230.0130.07320.43
5.5.220.0070.07720.36
5.5.210.0000.07020.46
5.5.200.0000.06020.41
5.5.190.0070.08020.30
5.5.180.0070.08320.38
5.5.160.0030.04320.32
5.5.150.0030.04720.45
5.5.140.0000.04720.26
5.5.130.0030.08320.45
5.5.120.0000.08720.31
5.5.110.0070.04020.30
5.5.100.0030.08320.34
5.5.90.0030.08320.16
5.5.80.0000.05720.35
5.5.70.0100.07720.27
5.5.60.0130.07020.33
5.5.50.0100.08320.14
5.5.40.0200.06720.24
5.5.30.0100.04020.14
5.5.20.0070.07320.27
5.5.10.0070.06720.27
5.5.00.0130.07020.15
5.4.450.0000.04719.53
5.4.440.0100.07719.62
5.4.430.0030.06319.56
5.4.420.0130.07319.42
5.4.410.0000.05019.44
5.4.400.0100.07719.30
5.4.390.0070.05019.06
5.4.380.0130.06719.24
5.4.370.0000.04319.24
5.4.360.0030.07719.25
5.4.350.0130.07319.24
5.4.340.0030.06719.04
5.4.320.0030.04019.30
5.4.310.0070.06319.29
5.4.300.0130.07019.44
5.4.290.0030.04719.20
5.4.280.0070.04319.09
5.4.270.0030.03718.99
5.4.260.0000.05019.09
5.4.250.0030.07719.23
5.4.240.0070.07019.02
5.4.230.0070.07319.31
5.4.220.0100.07019.43
5.4.210.0100.04719.02
5.4.200.0070.07719.32
5.4.190.0170.06318.98
5.4.180.0100.04319.21
5.4.170.0030.08018.98
5.4.160.0130.07319.18
5.4.150.0130.07019.00
5.4.140.0030.04316.35
5.4.130.0030.07716.52
5.4.120.0070.07716.48
5.4.110.0070.07016.62
5.4.100.0070.07016.50
5.4.90.0100.06716.62
5.4.80.0070.07016.63
5.4.70.0170.06316.61
5.4.60.0200.06016.43
5.4.50.0030.07316.55
5.4.40.0070.07016.52
5.4.30.0030.07716.42
5.4.20.0100.06716.48
5.4.10.0030.08016.43
5.4.00.0070.07015.92
5.3.290.0030.04714.66
5.3.280.0230.05714.55
5.3.270.0030.08314.46
5.3.260.0070.04714.59
5.3.250.0100.04714.58
5.3.240.0030.04014.60
5.3.230.0100.07714.51
5.3.220.0030.07314.56
5.3.210.0130.06714.39
5.3.200.0130.06714.41
5.3.190.0070.04014.56
5.3.180.0030.07714.57
5.3.170.0070.08014.53
5.3.160.0030.07714.40
5.3.150.0100.07714.56
5.3.140.0000.06314.49
5.3.130.0030.04714.53
5.3.120.0070.08314.54
5.3.110.0030.07714.43
5.3.100.0030.07714.03
5.3.90.0000.05714.00
5.3.80.0030.05013.88
5.3.70.0070.04013.93
5.3.60.0100.06713.86
5.3.50.0030.07713.91
5.3.40.0000.04713.93
5.3.30.0100.07313.86
5.3.20.0030.04713.66
5.3.10.0100.04013.43
5.3.00.0030.07713.60
5.2.170.0000.05312.48
5.2.160.0000.03312.48
5.2.150.0000.04712.48
5.2.140.0030.06312.48
5.2.130.0070.05712.48
5.2.120.0030.05012.48
5.2.110.0030.06712.48
5.2.100.0070.05712.48
5.2.90.0000.05012.48
5.2.80.0100.04712.48
5.2.70.0070.03712.48
5.2.60.0100.05712.48
5.2.50.0070.06012.48
5.2.40.0170.03712.48
5.2.30.0030.05712.48
5.2.20.0100.04312.48
5.2.10.0000.04012.48
5.2.00.0030.03712.48
5.1.60.0030.02312.48
5.1.50.0000.03312.48
5.1.40.0030.04012.48
5.1.30.0100.05012.48
5.1.20.0000.05012.48
5.1.10.0000.05712.48
5.1.00.0000.04312.48
5.0.50.0030.04312.48
5.0.40.0030.04312.48
5.0.30.0030.06012.48
5.0.20.0030.02012.48
5.0.10.0030.04312.48
5.0.00.0030.04312.48
4.4.90.0030.03012.48
4.4.80.0070.02712.48
4.4.70.0030.03312.48
4.4.60.0030.02712.48
4.4.50.0000.02712.48
4.4.40.0030.05312.48
4.4.30.0000.02312.48
4.4.20.0030.02312.48
4.4.10.0000.02712.48
4.4.00.0000.05712.48
4.3.110.0070.03012.48
4.3.100.0000.02012.48
4.3.90.0070.03012.48
4.3.80.0030.02712.48
4.3.70.0000.03312.48
4.3.60.0030.02712.48
4.3.50.0070.02012.48
4.3.40.0030.05012.48
4.3.30.0030.03712.48
4.3.20.0000.03312.48
4.3.10.0000.03312.48
4.3.00.0070.02712.48

preferences:
43.28 ms | 401 KiB | 5 Q