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.0080.00818.68
8.3.50.0130.00722.11
8.3.40.0080.00819.30
8.3.30.0000.01519.13
8.3.20.0060.00319.20
8.3.10.0050.00321.36
8.3.00.0030.00723.98
8.2.180.0040.01117.13
8.2.170.0120.00322.96
8.2.160.0000.01520.85
8.2.150.0050.00324.18
8.2.140.0030.00524.66
8.2.130.0040.00426.16
8.2.120.0000.00921.41
8.2.110.0110.00720.95
8.2.100.0080.00418.03
8.2.90.0020.00519.71
8.2.80.0040.00419.84
8.2.70.0050.00317.88
8.2.60.0000.00818.28
8.2.50.0040.00418.07
8.2.40.0000.00818.47
8.2.30.0040.00419.84
8.2.20.0060.00318.08
8.2.10.0070.00018.00
8.2.00.0040.00418.16
8.1.280.0070.01125.92
8.1.270.0040.00423.99
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0090.00922.97
8.1.230.0080.00421.32
8.1.220.0000.00918.77
8.1.210.0000.01019.27
8.1.200.0030.00617.72
8.1.190.0030.00517.91
8.1.180.0000.00818.10
8.1.170.0090.00018.87
8.1.160.0040.00419.25
8.1.150.0070.00018.99
8.1.140.0040.00417.76
8.1.130.0000.00718.31
8.1.120.0040.00417.71
8.1.110.0070.00017.61
8.1.100.0060.00317.84
8.1.90.0020.00517.78
8.1.80.0000.00717.75
8.1.70.0030.00517.75
8.1.60.0030.00717.96
8.1.50.0040.00417.62
8.1.40.0000.00817.71
8.1.30.0050.00318.07
8.1.20.0040.00418.00
8.1.10.0040.00418.01
8.1.00.0040.00417.84
8.0.300.0030.00620.19
8.0.290.0040.00417.43
8.0.280.0000.00718.75
8.0.270.0000.00717.50
8.0.260.0050.00317.12
8.0.250.0000.00717.40
8.0.240.0080.00017.18
8.0.230.0000.00817.39
8.0.220.0030.00317.16
8.0.210.0000.00717.34
8.0.200.0000.00817.44
8.0.190.0000.00717.28
8.0.180.0040.00417.29
8.0.170.0030.00417.20
8.0.160.0040.00417.33
8.0.150.0000.00817.31
8.0.140.0040.00417.30
8.0.130.0030.00313.80
8.0.120.0030.00617.16
8.0.110.0000.00717.29
8.0.100.0000.00717.21
8.0.90.0000.00717.14
8.0.80.0030.01717.33
8.0.70.0000.00717.26
8.0.60.0040.00417.34
8.0.50.0050.00317.18
8.0.30.0110.01217.38
8.0.20.0080.01117.55
8.0.10.0000.00717.40
8.0.00.0050.01717.02
7.4.330.0000.00517.20
7.4.320.0000.00616.79
7.4.300.0000.00716.79
7.4.290.0030.00316.97
7.4.280.0060.00316.86
7.4.270.0030.00316.88
7.4.260.0030.00313.49
7.4.250.0000.00816.79
7.4.240.0000.00816.89
7.4.230.0030.00516.93
7.4.220.0130.01316.77
7.4.210.0070.01016.94
7.4.200.0040.00316.91
7.4.190.0000.00717.01
7.4.160.0100.00516.87
7.4.150.0140.00417.40
7.4.140.0110.00717.86
7.4.130.0110.00616.87
7.4.120.0060.01116.81
7.4.110.0110.00916.96
7.4.100.0150.00816.87
7.4.90.0120.00816.80
7.4.80.0030.01419.39
7.4.70.0200.00316.93
7.4.60.0040.01216.99
7.4.50.0040.00416.71
7.4.40.0060.00822.77
7.4.30.0120.00917.07
7.4.00.0050.00915.26
7.3.330.0000.00513.46
7.3.320.0060.00013.37
7.3.310.0040.00416.61
7.3.300.0000.00716.64
7.3.290.0160.00316.63
7.3.280.0110.00616.64
7.3.270.0090.00917.40
7.3.260.0080.01218.24
7.3.250.0130.00816.79
7.3.240.0140.00316.66
7.3.230.0100.00716.58
7.3.210.0130.01016.65
7.3.200.0110.00819.39
7.3.190.0130.00616.88
7.3.180.0090.00616.79
7.3.170.0000.01616.62
7.3.160.0080.00916.87
7.3.120.0070.00414.81
7.2.330.0160.00616.75
7.2.320.0130.01017.08
7.2.310.0070.01016.64
7.2.300.0090.00916.59
7.2.290.0100.00717.11
7.2.00.0030.01019.71
7.1.100.0070.00718.38
7.1.70.0060.00617.33
7.1.60.0090.01217.45
7.1.50.0000.01217.11
7.1.40.0060.00916.67
7.1.30.0000.01416.70
7.1.20.0110.01116.94
7.1.10.0040.01516.81
7.1.00.0050.00516.77
7.0.200.0080.00416.98
7.0.190.0090.00317.01
7.0.180.0080.00816.50
7.0.170.0050.00716.44
7.0.160.0080.00816.41
7.0.150.0160.00316.28
7.0.140.0080.00416.55
7.0.130.0000.01316.73
7.0.120.0110.00816.58
7.0.110.0000.01816.50
7.0.100.0000.01816.57
7.0.90.0070.01016.38
7.0.80.0060.00616.50
7.0.70.0030.01016.51
7.0.60.0080.00316.34
7.0.50.0110.00816.44
7.0.40.0000.01715.18
7.0.30.0090.00615.18
7.0.20.0050.00515.18
7.0.10.0000.01015.18
7.0.00.0030.00615.18
5.6.300.0070.04521.06
5.6.290.0080.04521.00
5.6.280.0100.04621.09
5.6.270.0000.04920.90
5.6.260.0130.04421.09
5.6.250.0040.08821.02
5.6.240.0000.05121.05
5.6.230.0100.03920.87
5.6.220.0030.04820.95
5.6.210.0000.05321.24
5.6.200.0090.05421.02
5.6.190.0070.05021.04
5.6.180.0040.04620.98
5.6.170.0040.04421.07
5.6.160.0060.03820.95
5.6.150.0070.04620.95
5.6.140.0130.03621.08
5.6.130.0030.04821.04
5.6.120.0060.04820.91
5.6.110.0120.03921.02
5.6.100.0070.05021.06
5.6.90.0030.04521.02
5.6.80.0040.04320.30
5.6.70.0030.04420.54
5.6.60.0070.04020.42
5.6.50.0000.04320.35
5.6.40.0030.04420.36
5.6.30.0030.04520.34
5.6.20.0040.04420.43
5.6.10.0070.04120.31
5.6.00.0030.04520.31
5.5.380.0030.03917.70
5.5.370.0000.04417.88
5.5.360.0030.04117.52
5.5.350.0000.04317.68
5.5.340.0070.06618.18
5.5.330.0070.04118.25
5.5.320.0060.04118.18
5.5.310.0040.04218.07
5.5.300.0030.05018.18
5.5.290.0030.04118.23
5.5.280.0000.04918.15
5.5.270.0030.08417.91
5.5.260.0060.04418.14
5.5.250.0130.03017.88
5.5.240.0000.04117.67
5.5.230.0000.05217.53
5.5.220.0030.03717.45
5.5.210.0000.04117.48
5.5.200.0000.03917.50
5.5.190.0070.04017.54
5.5.180.0030.04317.53
5.5.160.0000.04317.34
5.5.150.0030.04017.59
5.5.140.0070.03617.55
5.5.130.0030.05217.49
5.5.120.0040.03917.55
5.5.110.0070.03417.56
5.5.100.0070.03617.36
5.5.90.0030.03717.47
5.5.80.0070.03317.33
5.5.70.0030.06017.44
5.5.60.0090.03317.32
5.5.50.0030.03817.42
5.5.40.0000.04017.42
5.5.30.0070.03317.46
5.5.20.0100.06217.37
5.5.10.0000.04617.51
5.5.00.0000.04117.50
5.4.450.0070.07919.42
5.4.440.0030.04219.52
5.4.430.0100.04019.68
5.4.420.0030.04319.57
5.4.410.0030.03819.39
5.4.400.0100.03819.20
5.4.390.0070.03719.10
5.4.380.0070.03619.32
5.4.370.0000.04219.09
5.4.360.0070.03619.36
5.4.350.0060.03519.07
5.4.340.0060.03519.18
5.4.320.0060.03519.21
5.4.310.0070.03719.31
5.4.300.0040.04219.09
5.4.290.0030.03819.31
5.4.280.0070.03919.17
5.4.270.0070.03319.09
5.4.260.0060.03519.09
5.4.250.0070.03319.19
5.4.240.0070.03819.29
5.4.230.0090.03219.23
5.4.220.0070.03619.32
5.4.210.0040.04019.26
5.4.200.0030.04219.16
5.4.190.0100.05619.05
5.4.180.0030.04719.19
5.4.170.0120.03019.16
5.4.160.0030.04019.07
5.4.150.0040.04019.25
5.4.140.0130.02916.45
5.4.130.0040.03616.55
5.4.120.0030.04216.69
5.4.110.0030.05416.63
5.4.100.0260.03016.69
5.4.90.0060.03216.70
5.4.80.0000.04316.69
5.4.70.0040.03616.83
5.4.60.0000.04216.44
5.4.50.0030.03616.67
5.4.40.0030.03716.75
5.4.30.0040.03516.63
5.4.20.0000.03816.90
5.4.10.0070.03616.70
5.4.00.0030.03716.05
5.3.290.0070.03615.18
5.3.280.0090.03415.18
5.3.270.0100.03515.18
5.3.260.0000.05415.18
5.3.250.0030.03615.18
5.3.240.0100.03015.18
5.3.230.0030.04215.18
5.3.220.0000.04315.18
5.3.210.0040.04115.18
5.3.200.0030.04015.18
5.3.190.0140.04115.18
5.3.180.0030.04115.18
5.3.170.0090.03015.18
5.3.160.0090.03115.18
5.3.150.0070.06115.18
5.3.140.0300.02015.18
5.3.130.0030.03615.18
5.3.120.0160.03615.18
5.3.110.0060.03515.18
5.3.100.0030.04215.18
5.3.90.0040.04215.18
5.3.80.0030.03715.18
5.3.70.0120.02715.18
5.3.60.0070.03515.18
5.3.50.0100.03015.18
5.3.40.0030.03815.18
5.3.30.0000.04215.18
5.3.20.0030.03415.18
5.3.10.0030.03515.18
5.3.00.0000.03715.18
5.2.170.0100.02915.18
5.2.160.0040.03615.18
5.2.150.0030.02915.18
5.2.140.0040.03515.18
5.2.130.0000.03515.18
5.2.120.0030.03015.18
5.2.110.0030.02615.18
5.2.100.0000.03515.18
5.2.90.0070.02415.18
5.2.80.0060.02815.18
5.2.70.0000.04115.18
5.2.60.0060.02815.18
5.2.50.0030.03115.18
5.2.40.0000.03215.18
5.2.30.0000.03115.18
5.2.20.0000.03315.18
5.2.10.0070.02415.18
5.2.00.0000.03315.18
5.1.60.0030.02615.18
5.1.50.0070.02015.18
5.1.40.0030.02715.18
5.1.30.0000.02815.18
5.1.20.0030.05315.18
5.1.10.0030.03715.18
5.1.00.0070.02315.18
5.0.50.0070.01715.18
5.0.40.0030.01915.18
5.0.30.0070.03615.18
5.0.20.0000.02515.18
5.0.10.0030.03415.18
5.0.00.0000.03515.18
4.4.90.0040.01515.18
4.4.80.0030.01315.18
4.4.70.0030.02115.18
4.4.60.0030.02415.18
4.4.50.0000.02315.18
4.4.40.0000.02715.18
4.4.30.0000.01915.18
4.4.20.0030.01515.18
4.4.10.0000.01815.18
4.4.00.0000.02615.18
4.3.110.0000.01615.18
4.3.100.0000.01715.18
4.3.90.0040.02815.18
4.3.80.0030.02215.18
4.3.70.0030.01415.18
4.3.60.0030.01315.18
4.3.50.0000.02715.18
4.3.40.0030.03615.18
4.3.30.0060.01815.18
4.3.20.0060.03515.18
4.3.10.0030.03515.18
4.3.00.0000.04015.18

preferences:
42.19 ms | 401 KiB | 5 Q