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->xpath('g/path')[0]->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.0090.01218.55
8.3.50.0230.01122.11
8.3.40.0150.00018.95
8.3.30.0070.00718.76
8.3.20.0040.00418.89
8.3.10.0040.00421.30
8.3.00.0040.00424.03
8.2.180.0060.00916.84
8.2.170.0120.00322.96
8.2.160.0070.00720.77
8.2.150.0120.00324.18
8.2.140.0060.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00821.27
8.2.110.0170.00720.85
8.2.100.0040.00818.22
8.2.90.0030.00618.46
8.2.80.0040.00419.71
8.2.70.0050.00317.63
8.2.60.0050.00318.05
8.2.50.0080.00018.07
8.2.40.0040.00418.53
8.2.30.0070.00019.71
8.2.20.0030.00617.76
8.2.10.0050.00217.98
8.2.00.0040.00717.99
8.1.280.0030.01725.92
8.1.270.0030.00623.99
8.1.260.0160.00326.35
8.1.250.0000.00828.09
8.1.240.0030.00522.49
8.1.230.0090.00322.93
8.1.220.0050.00317.89
8.1.210.0040.01019.17
8.1.200.0030.00617.60
8.1.190.0060.00317.78
8.1.180.0000.00818.10
8.1.170.0000.00918.71
8.1.160.0050.00219.21
8.1.150.0070.00018.96
8.1.140.0050.00217.64
8.1.130.0050.00218.11
8.1.120.0000.00717.78
8.1.110.0070.00017.56
8.1.100.0070.00017.75
8.1.90.0050.00317.59
8.1.80.0040.00417.79
8.1.70.0000.00817.69
8.1.60.0030.00617.84
8.1.50.0040.00417.62
8.1.40.0050.00317.67
8.1.30.0040.00418.00
8.1.20.0050.00317.80
8.1.10.0040.00417.88
8.1.00.0000.00817.55
8.0.300.0000.00720.35
8.0.290.0000.00717.43
8.0.280.0000.00818.68
8.0.270.0040.00417.50
8.0.260.0050.00317.20
8.0.250.0080.00017.12
8.0.240.0050.00317.35
8.0.230.0000.00717.11
8.0.220.0030.00617.11
8.0.210.0040.00417.07
8.0.200.0070.00317.13
8.0.190.0080.00017.34
8.0.180.0060.00317.12
8.0.170.0000.00817.14
8.0.160.0000.00717.39
8.0.150.0070.00017.30
8.0.140.0070.00017.06
8.0.130.0050.00013.72
8.0.120.0040.00417.27
8.0.110.0000.00717.20
8.0.100.0000.00717.22
8.0.90.0070.00017.16
8.0.80.0000.01517.29
8.0.70.0000.00717.18
8.0.60.0040.00417.11
8.0.50.0000.00817.01
8.0.30.0140.00717.23
8.0.20.0110.00817.40
8.0.10.0040.00417.43
8.0.00.0080.01717.13
7.4.330.0030.00317.19
7.4.320.0070.00016.80
7.4.300.0030.00316.68
7.4.290.0070.00016.87
7.4.280.0040.00416.87
7.4.270.0000.00716.92
7.4.260.0050.00013.47
7.4.250.0060.00316.54
7.4.240.0030.00316.95
7.4.230.0000.00716.68
7.4.220.0130.01016.80
7.4.210.0070.00816.82
7.4.200.0030.00316.77
7.4.190.0080.00016.87
7.4.160.0080.01116.72
7.4.150.0130.00317.40
7.4.140.0140.00617.86
7.4.130.0120.00516.70
7.4.120.0100.00716.76
7.4.110.0000.01716.69
7.4.100.0070.01116.84
7.4.90.0140.00416.70
7.4.80.0120.00619.39
7.4.70.0090.01516.80
7.4.60.0120.00616.80
7.4.50.0030.00616.66
7.4.40.0070.00722.77
7.4.30.0100.00716.69
7.4.10.0060.01215.36
7.4.00.0030.01314.86
7.3.330.0060.00013.39
7.3.320.0030.00313.10
7.3.310.0030.00316.41
7.3.300.0000.00716.46
7.3.290.0060.00816.46
7.3.280.0080.01116.59
7.3.270.0100.00717.40
7.3.260.0140.01018.24
7.3.250.0120.00816.50
7.3.240.0030.01616.67
7.3.230.0130.00316.64
7.3.210.0120.00616.56
7.3.200.0100.01419.39
7.3.190.0070.01016.91
7.3.180.0040.01116.54
7.3.170.0120.00916.58
7.3.160.0090.00616.73
7.3.130.0030.01414.88
7.3.120.0070.00714.82
7.3.110.0070.01115.26
7.3.100.0070.00714.96
7.3.90.0120.00314.84
7.3.80.0060.00314.79
7.3.70.0030.00614.89
7.3.60.0140.00014.75
7.3.50.0110.00415.02
7.3.40.0030.00514.79
7.3.30.0070.01014.57
7.3.20.0030.00616.73
7.3.10.0040.01116.91
7.3.00.0060.00616.82
7.2.330.0140.00416.66
7.2.320.0100.01316.88
7.2.310.0150.00616.79
7.2.300.0110.00516.66
7.2.290.0140.00316.82
7.2.260.0030.01515.23
7.2.250.0000.01815.28
7.2.240.0070.00714.89
7.2.230.0100.00315.20
7.2.220.0100.01015.10
7.2.210.0000.01514.85
7.2.200.0000.01415.11
7.2.190.0070.00714.88
7.2.180.0000.01715.22
7.2.170.0030.01215.05
7.2.160.0070.00714.79
7.2.150.0100.00316.95
7.2.140.0100.00316.91
7.2.130.0060.01217.07
7.2.120.0100.01016.85
7.2.110.0070.01016.86
7.2.100.0030.00916.87
7.2.90.0060.00917.03
7.2.80.0030.00617.07
7.2.70.0070.00716.67
7.2.60.0110.00516.74
7.2.50.0030.01417.02
7.2.40.0130.00617.01
7.2.30.0080.01117.06
7.2.20.0040.01116.71
7.2.10.0100.00016.96
7.2.00.0030.01118.37
7.1.330.0090.00615.84
7.1.320.0070.00715.82
7.1.310.0000.01215.97
7.1.300.0000.01416.04
7.1.290.0060.00315.93
7.1.280.0060.00915.85
7.1.270.0040.00415.89
7.1.260.0070.00715.87
7.1.250.0120.00315.63
7.1.240.0130.00316.01
7.1.230.0050.00615.54
7.1.220.0040.01115.85
7.1.210.0040.00815.86
7.1.200.0090.00215.93
7.1.190.0100.00316.00
7.1.180.0100.00015.88
7.1.170.0070.00315.91
7.1.160.0040.01115.87
7.1.150.0100.00315.78
7.1.140.0040.00816.00
7.1.130.0040.00916.01
7.1.120.0060.00315.97
7.1.110.0100.00316.09
7.1.100.0050.00617.14
7.1.90.0090.00016.04
7.1.80.0050.00815.85
7.1.70.0020.00816.55
7.1.60.0030.00816.49
7.1.50.0020.00916.54
7.1.40.0080.00916.34
7.1.30.0090.00616.21
7.1.20.0020.01216.48
7.1.10.0060.00616.24
7.1.00.0040.00516.38
7.0.330.0070.00715.54
7.0.320.0100.00315.22
7.0.310.0000.01215.41
7.0.300.0070.00715.40
7.0.290.0000.01815.37
7.0.280.0000.00915.79
7.0.270.0040.01115.87
7.0.260.0050.00315.69
7.0.250.0060.00615.62
7.0.240.0040.00415.72
7.0.230.0050.00315.70
7.0.220.0040.01115.63
7.0.210.0110.00415.61
7.0.200.0050.00316.21
7.0.190.0030.00716.00
7.0.180.0050.00716.01
7.0.170.0040.00815.95
7.0.160.0050.01015.98
7.0.150.0000.00816.05
7.0.140.0060.00816.06
7.0.130.0040.00716.22
7.0.120.0050.00516.17
7.0.110.0040.00516.09
7.0.100.0010.00816.03
7.0.90.0020.00816.15
7.0.80.0050.00615.95
7.0.70.0040.00916.13
7.0.60.0020.00816.16
7.0.50.0040.00516.06
7.0.40.0080.00714.98
7.0.30.0050.00614.94
7.0.20.0070.00714.91
7.0.10.0000.01014.96
7.0.00.0010.00715.08
5.6.400.0100.00714.64
5.6.390.0060.00914.43
5.6.380.0110.00314.47
5.6.370.0000.01214.27
5.6.360.0070.01014.56
5.6.350.0110.00714.51
5.6.340.0040.00714.24
5.6.330.0000.01514.41
5.6.320.0040.00414.71
5.6.310.0040.00714.56
5.6.300.0030.03017.84
5.6.290.0020.04317.59
5.6.280.0070.02217.64
5.6.270.0020.02717.74
5.6.260.0080.02117.62
5.6.250.0080.02917.83
5.6.240.0030.02617.96
5.6.230.0020.03117.70
5.6.220.0040.02317.76
5.6.210.0050.02417.67
5.6.200.0080.02017.72
5.6.190.0070.02617.74
5.6.180.0050.03217.81
5.6.170.0030.02817.65
5.6.160.0080.02017.87
5.6.150.0080.02017.65
5.6.140.0030.02617.75
5.6.130.0030.02817.66
5.6.120.0030.02417.81
5.6.110.0020.02717.52
5.6.100.0030.02617.73
5.6.90.0020.02617.90
5.6.80.0030.02517.37
5.6.70.0050.02917.29
5.6.60.0020.02517.45
5.6.50.0050.02117.39
5.6.40.0080.01917.35
5.6.30.0090.02217.38
5.6.20.0000.02617.50
5.6.10.0050.02217.31
5.6.00.0000.02717.27
5.5.380.0050.02316.06
5.5.370.0050.02515.92
5.5.360.0050.02215.92
5.5.350.0030.02415.97
5.5.340.0050.02316.20
5.5.330.0050.04116.01
5.5.320.0020.02416.28
5.5.310.0040.03016.22
5.5.300.0030.02616.12
5.5.290.0090.02016.26
5.5.280.0030.02716.38
5.5.270.0030.02616.36
5.5.260.0050.02316.21
5.5.250.0030.02416.03
5.5.240.0030.02415.87
5.5.230.0020.02315.93
5.5.220.0050.02515.89
5.5.210.0100.02315.83
5.5.200.0050.03615.87
5.5.190.0000.02715.90
5.5.180.0050.02015.94
5.5.170.0000.01314.43
5.5.160.0040.02215.93
5.5.150.0080.01915.85
5.5.140.0100.01715.97
5.5.130.0050.02015.94
5.5.120.0030.02315.92
5.5.110.0030.02315.81
5.5.100.0020.02515.86
5.5.90.0200.01315.92
5.5.80.0030.02315.91
5.5.70.0030.02415.71
5.5.60.0030.02315.77
5.5.50.0090.02115.77
5.5.40.0030.02115.65
5.5.30.0060.02015.80
5.5.20.0050.02415.62
5.5.10.0150.02115.69
5.5.00.0080.02115.72
5.4.450.0030.02515.22
5.4.440.0060.02115.31
5.4.430.0050.02315.28
5.4.420.0100.02015.35
5.4.410.0060.02115.18
5.4.400.0030.02615.18
5.4.390.0080.01915.03
5.4.380.0030.02014.96
5.4.370.0050.02015.01
5.4.360.0030.02415.18
5.4.350.0030.04415.04
5.4.340.0030.02215.14
5.4.330.0000.01211.04
5.4.320.0030.02215.15
5.4.310.0020.02315.02
5.4.300.0030.02014.97
5.4.290.0050.02115.03
5.4.280.0000.03515.04
5.4.270.0080.02215.11
5.4.260.0010.02815.09
5.4.250.0020.02215.04
5.4.240.0020.02315.09
5.4.230.0060.02115.14
5.4.220.0050.02815.09
5.4.210.0060.02114.97
5.4.200.0130.02115.18
5.4.190.0030.02115.15
5.4.180.0050.02114.83
5.4.170.0080.01815.10
5.4.160.0020.02315.03
5.4.150.0140.01515.00
5.4.140.0050.02213.74
5.4.130.0040.01813.84
5.4.120.0050.02013.76
5.4.110.0020.02213.83
5.4.100.0030.02213.78
5.4.90.0050.01813.84
5.4.80.0020.02114.02
5.4.70.0050.01813.68
5.4.60.0050.01613.82
5.4.50.0010.02113.80
5.4.40.0030.03013.70
5.4.30.0040.02013.75
5.4.20.0020.02313.76
5.4.10.0050.02313.76
5.4.00.0070.01813.67
5.3.290.0000.02613.33
5.3.280.0070.01813.31
5.3.270.0060.02113.43
5.3.260.0000.02213.44
5.3.250.0100.01813.42
5.3.240.0030.02113.43
5.3.230.0050.02013.38
5.3.220.0070.01713.36
5.3.210.0020.02313.31
5.3.200.0030.02113.35
5.3.190.0030.02213.39
5.3.180.0040.02013.45
5.3.170.0050.01913.41
5.3.160.0060.01713.46
5.3.150.0040.01913.41
5.3.140.0080.02113.42
5.3.130.0000.02313.38
5.3.120.0030.01913.48
5.3.110.0000.02713.44
5.3.100.0050.01913.31
5.3.90.0020.02113.41
5.3.80.0020.02013.31
5.3.70.0000.02313.31
5.3.60.0020.02113.44
5.3.50.0020.02213.32
5.3.40.0100.01813.34
5.3.30.0020.02313.37
5.3.20.0070.01613.31
5.3.10.0030.02313.33
5.3.00.0030.02013.31
5.2.170.0000.03216.27
5.2.160.0000.03016.27
5.2.150.0100.02716.27
5.2.140.0030.02816.27
5.2.130.0040.02616.27
5.2.120.0070.02316.27
5.2.110.0000.03116.27
5.2.100.0060.02416.27
5.2.90.0000.03116.27
5.2.80.0030.02816.27
5.2.70.0000.03116.27
5.2.60.0030.02716.27
5.2.50.0070.03016.27
5.2.40.0090.02216.27
5.2.30.0030.02916.27
5.2.20.0070.02316.27
5.2.10.0030.03116.27
5.2.00.0000.02916.27
5.1.60.0000.02616.27
5.1.50.0100.02116.27
5.1.40.0000.02616.27
5.1.30.0000.02816.27
5.1.20.0040.02516.27
5.1.10.0030.02316.27
5.1.00.0100.02716.27
5.0.50.0000.02216.27
5.0.40.0070.01816.27
5.0.30.0030.03716.27
5.0.20.0030.01716.27
5.0.10.0030.03416.27
5.0.00.0030.03016.27
4.4.90.0030.01316.27
4.4.80.0030.01316.27
4.4.70.0030.01316.27
4.4.60.0000.01716.27
4.4.50.0000.01616.27
4.4.40.0030.02216.27
4.4.30.0030.01316.27
4.4.20.0000.01716.27
4.4.10.0040.01816.27
4.4.00.0000.03216.27
4.3.110.0030.01716.27
4.3.100.0000.02216.27
4.3.90.0000.01616.27
4.3.80.0000.02716.27
4.3.70.0030.01516.27
4.3.60.0000.01816.27
4.3.50.0030.01816.27
4.3.40.0070.02316.27
4.3.30.0100.01016.27
4.3.20.0070.01516.27
4.3.10.0000.01616.27
4.3.00.0030.02316.27

preferences:
88.82 ms | 401 KiB | 5 Q