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: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.0040.01118.80
8.3.50.0090.01022.12
8.3.40.0150.00619.21
8.3.30.0160.00319.24
8.3.20.0060.00319.27
8.3.10.0040.00421.46
8.3.00.0000.00724.03
8.2.180.0140.00017.13
8.2.170.0090.00622.96
8.2.160.0130.00720.90
8.2.150.0110.00424.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0030.00521.63
8.2.110.0060.00321.54
8.2.100.0040.00818.16
8.2.90.0080.00019.59
8.2.80.0040.00417.97
8.2.70.0090.00318.00
8.2.60.0030.00618.18
8.2.50.0000.00818.07
8.2.40.0080.00018.28
8.2.30.0040.00419.75
8.2.20.0040.00418.05
8.2.10.0000.00818.03
8.2.00.0070.00318.05
8.1.280.0110.01125.92
8.1.270.0040.00423.99
8.1.260.0140.00426.35
8.1.250.0040.00428.09
8.1.240.0030.00621.64
8.1.230.0000.01217.85
8.1.220.0000.00818.15
8.1.210.0040.00418.77
8.1.200.0100.00017.60
8.1.190.0080.00017.47
8.1.180.0030.00518.10
8.1.170.0080.00018.95
8.1.160.0040.00419.21
8.1.150.0030.00518.98
8.1.140.0070.00017.75
8.1.130.0040.00418.12
8.1.120.0040.00417.73
8.1.110.0040.00417.86
8.1.100.0050.00317.75
8.1.90.0030.00617.66
8.1.80.0040.00417.77
8.1.70.0070.00017.75
8.1.60.0030.00617.84
8.1.50.0040.00417.93
8.1.40.0080.00017.79
8.1.30.0000.00817.95
8.1.20.0030.00618.09
8.1.10.0000.00718.01
8.1.00.0070.00017.95
8.0.300.0000.00718.77
8.0.290.0040.00417.00
8.0.280.0070.00018.74
8.0.270.0030.00317.52
8.0.260.0030.00317.23
8.0.250.0050.00217.20
8.0.240.0000.00817.21
8.0.230.0050.00317.27
8.0.220.0070.00317.34
8.0.210.0070.00017.34
8.0.200.0070.00017.21
8.0.190.0040.00417.43
8.0.180.0000.00817.36
8.0.170.0000.00717.16
8.0.160.0050.00217.21
8.0.150.0070.00017.06
8.0.140.0040.00417.10
8.0.130.0000.00613.65
8.0.120.0090.00017.18
8.0.110.0030.00517.27
8.0.100.0050.00217.19
8.0.90.0040.00417.33
8.0.80.0100.01317.30
8.0.70.0050.00217.18
8.0.60.0000.00717.33
8.0.50.0040.00417.29
8.0.30.0080.01317.49
8.0.20.0130.01317.40
8.0.10.0020.00517.23
8.0.00.0100.01017.23
7.4.330.0020.00217.09
7.4.320.0060.00016.88
7.4.300.0000.00616.95
7.4.290.0030.00317.05
7.4.280.0040.00717.08
7.4.270.0040.00416.89
7.4.260.0050.00013.77
7.4.250.0040.00416.76
7.4.240.0050.00216.83
7.4.230.0040.00416.87
7.4.220.0100.01016.79
7.4.210.0120.00317.00
7.4.200.0030.00316.85
7.4.190.0030.00316.84
7.4.160.0150.00316.81
7.4.150.0120.00617.40
7.4.140.0190.01917.86
7.4.130.0050.01616.86
7.4.120.0100.00816.94
7.4.110.0100.00716.89
7.4.100.0080.00816.91
7.4.90.0100.01016.95
7.4.80.0100.00919.39
7.4.70.0100.01416.77
7.4.60.0090.00917.14
7.4.50.0030.00616.85
7.4.40.0030.01322.77
7.4.30.0130.00317.05
7.4.00.0050.01215.29
7.3.330.0050.00013.51
7.3.320.0050.00213.59
7.3.310.0000.00716.72
7.3.300.0000.00716.72
7.3.290.0090.00516.82
7.3.280.0070.01116.67
7.3.270.0120.00617.40
7.3.260.0160.00618.24
7.3.250.0060.01116.86
7.3.240.0030.01416.86
7.3.230.0130.01116.75
7.3.210.0060.01116.80
7.3.200.0090.01219.39
7.3.190.0100.01016.78
7.3.180.0100.00617.04
7.3.170.0080.00816.80
7.3.160.0130.00316.73
7.3.120.0100.00515.13
7.3.110.0060.00614.92
7.3.100.0040.01114.82
7.3.90.0090.00015.10
7.3.80.0060.01014.77
7.3.70.0030.01114.89
7.3.60.0060.00915.00
7.3.50.0060.01115.18
7.3.40.0060.00914.99
7.3.30.0030.01314.84
7.3.20.0000.01316.63
7.3.10.0120.00316.75
7.3.00.0070.00716.73
7.2.330.0030.01416.59
7.2.320.0070.01916.81
7.2.310.0120.00616.89
7.2.300.0070.01016.81
7.2.290.0100.00717.09
7.2.250.0040.01614.93
7.2.240.0140.00715.33
7.2.230.0000.01715.40
7.2.220.0030.00915.19
7.2.210.0130.00014.78
7.2.200.0090.00915.34
7.2.190.0070.01014.90
7.2.180.0040.01115.07
7.2.170.0030.00815.20
7.2.60.0000.01517.28
7.2.00.0000.00919.46
7.1.330.0090.00615.71
7.1.320.0030.00615.93
7.1.310.0000.01315.82
7.1.300.0040.00716.07
7.1.290.0000.01415.80
7.1.280.0060.00915.79
7.1.270.0060.00915.80
7.1.260.0140.00016.02
7.1.200.0070.00415.80
7.1.70.0040.00417.48
7.1.60.0070.00417.44
7.1.50.0100.01734.98
7.1.00.0030.05322.63
7.0.200.0060.01217.03
7.0.140.0030.07322.15
7.0.100.0070.08720.27
7.0.90.0100.05320.04
7.0.80.0130.06320.05
7.0.70.0130.08320.05
7.0.60.0100.07720.07
7.0.50.0030.09020.55
7.0.40.0070.07020.30
7.0.30.0070.04020.30
7.0.20.0000.04720.26
7.0.10.0130.03720.25
7.0.00.0070.04320.20
5.6.280.0030.07321.03
5.6.250.0130.07720.77
5.6.240.0030.06020.66
5.6.230.0070.08020.68
5.6.220.0130.08020.70
5.6.210.0070.08020.73
5.6.200.0030.06021.29
5.6.190.0130.06721.17
5.6.180.0000.04721.22
5.6.170.0130.04021.15
5.6.160.0030.05021.28
5.6.150.0030.05021.30
5.6.140.0030.03321.25
5.6.130.0070.04021.21
5.6.120.0070.03721.19
5.6.110.0070.03721.18
5.6.100.0030.05721.24
5.6.90.0070.04021.18
5.6.80.0070.04720.73
5.6.70.0070.04020.55
5.6.60.0030.03720.58
5.6.50.0070.03720.59
5.6.40.0070.05720.49
5.6.30.0100.06720.49
5.6.20.0030.04320.46
5.6.10.0030.04020.64
5.6.00.0100.03320.60
5.5.380.0130.08020.57
5.5.370.0100.05020.57
5.5.360.0030.08020.55
5.5.350.0170.07720.46
5.5.340.0100.07721.10
5.5.330.0100.08320.92
5.5.320.0070.04321.04
5.5.310.0000.05021.00
5.5.300.0070.03721.04
5.5.290.0070.03321.02
5.5.280.0000.05021.12
5.5.270.0000.04721.03
5.5.260.0030.04321.07
5.5.250.0030.05320.87
5.5.240.0100.08020.50
5.5.230.0070.04020.39
5.5.220.0000.07320.39
5.5.210.0030.05720.48
5.5.200.0100.03020.40
5.5.190.0030.04320.37
5.5.180.0030.04020.30
5.5.160.0030.04020.45
5.5.150.0000.03720.29
5.5.140.0030.04020.43
5.5.130.0070.03720.38
5.5.120.0070.05020.36
5.5.110.0130.06020.29
5.5.100.0030.03720.32
5.5.90.0170.06320.16
5.5.80.0100.07020.30
5.5.70.0130.07720.30
5.5.60.0000.07320.18
5.5.50.0030.04720.17
5.5.40.0100.07320.23
5.5.30.0130.05320.14
5.5.20.0100.07720.18
5.5.10.0100.05320.21
5.5.00.0100.06320.20
5.4.450.0000.04719.43
5.4.440.0100.07719.35
5.4.430.0070.03719.41
5.4.420.0030.03719.41
5.4.410.0070.05719.43
5.4.400.0070.03319.24
5.4.390.0030.03719.44
5.4.380.0030.04019.09
5.4.370.0000.04019.24
5.4.360.0030.03719.25
5.4.350.0030.04019.02
5.4.340.0100.03719.40
5.4.320.0070.04319.12
5.4.310.0030.04319.27
5.4.300.0030.03719.23
5.4.290.0070.03719.02
5.4.280.0100.03019.02
5.4.270.0030.03719.10
5.4.260.0030.06319.25
5.4.250.0030.05019.43
5.4.240.0130.07019.29
5.4.230.0070.06718.99
5.4.220.0000.08019.25
5.4.210.0130.06719.25
5.4.200.0130.06719.01
5.4.190.0130.07319.28
5.4.180.0130.07319.17
5.4.170.0200.07019.00
5.4.160.0170.04319.43
5.4.150.0070.08019.27
5.4.140.0100.07316.48
5.4.130.0100.06316.53
5.4.120.0100.06716.57
5.4.110.0030.04016.51
5.4.100.0170.04716.51
5.4.90.0000.07316.59
5.4.80.0030.04716.51
5.4.70.0130.06016.42
5.4.60.0100.04316.59
5.4.50.0230.03016.48
5.4.40.0070.06716.68
5.4.30.0030.08016.66
5.4.20.0030.04716.55
5.4.10.0030.07316.57
5.4.00.0070.07315.85
5.3.290.0030.03714.49
5.3.280.0070.07714.55
5.3.270.0100.07014.61
5.3.260.0070.07714.42
5.3.250.0070.07714.47
5.3.240.0030.08014.46
5.3.230.0100.07314.46
5.3.220.0070.06714.43
5.3.210.0030.06014.56
5.3.200.0070.07314.53
5.3.190.0100.06014.53
5.3.180.0070.07714.40
5.3.170.0100.05714.42
5.3.160.0030.08014.56
5.3.150.0100.07314.55
5.3.140.0030.08014.55
5.3.130.0070.06314.55
5.3.120.0130.06714.52
5.3.110.0030.08014.46
5.3.100.0100.04713.90
5.3.90.0100.07313.93
5.3.80.0070.07714.00
5.3.70.0070.06713.88
5.3.60.0100.06013.95
5.3.50.0100.06713.93
5.3.40.0100.07013.70
5.3.30.0100.06713.91
5.3.20.0030.07313.68
5.3.10.0000.07313.52
5.3.00.0070.07013.55
5.2.170.0030.06312.61
5.2.160.0100.05312.61
5.2.150.0030.06012.61
5.2.140.0000.04012.61
5.2.130.0070.06012.61
5.2.120.0100.05712.61
5.2.110.0100.05712.61
5.2.100.0030.04012.61
5.2.90.0070.05012.61
5.2.80.0100.05312.61
5.2.70.0070.04712.61
5.2.60.0070.06012.61
5.2.50.0030.04312.61
5.2.40.0030.03312.61
5.2.30.0070.06012.61
5.2.20.0070.06312.61
5.2.10.0000.03012.61
5.2.00.0030.05312.61
5.1.60.0030.02712.61
5.1.50.0030.05712.61
5.1.40.0100.05012.61
5.1.30.0000.05012.61
5.1.20.0000.06312.61
5.1.10.0100.05012.61
5.1.00.0070.05312.61
5.0.50.0070.02012.61
5.0.40.0000.03312.61
5.0.30.0070.05012.61
5.0.20.0000.02312.61
5.0.10.0070.04012.61
5.0.00.0070.05712.61
4.4.90.0000.03712.61
4.4.80.0070.02312.61
4.4.70.0030.03312.61
4.4.60.0000.03712.61
4.4.50.0070.03312.61
4.4.40.0070.04712.61
4.4.30.0000.03712.61
4.4.20.0030.03712.61
4.4.10.0030.01712.61
4.4.00.0000.06012.61
4.3.110.0030.03012.61
4.3.100.0030.02712.61
4.3.90.0070.02712.61
4.3.80.0030.05312.61
4.3.70.0070.03012.61
4.3.60.0000.03712.61
4.3.50.0070.03012.61
4.3.40.0030.05012.61
4.3.30.0030.02312.61
4.3.20.0030.03712.61
4.3.10.0000.03712.61
4.3.00.0070.03012.61

preferences:
41.41 ms | 401 KiB | 5 Q