3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getDatiTrasmissione() { $header = ' <DatiTrasmissione> <IdTrasmittente> <IdPaese>IT</IdPaese> <IdCodice>01234567890</IdCodice> </IdTrasmittente> <ProgressivoInvio>00001</ProgressivoInvio> <FormatoTrasmissione>SDI10</FormatoTrasmissione> <CodiceDestinatario>AAAAAA</CodiceDestinatario> <ContattiTrasmittente> <Telefono>060601</Telefono> <Email>prova@mail.it</Email> </ContattiTrasmittente> </DatiTrasmissione>'; return simplexml_load_string($header,'SimpleXMLElement', LIBXML_NOCDATA); } $fc = simplexml_load_string('<p:FatturaElettronica versione="1.0" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:p="http://www.fatturapa.gov.it/sdi/fatturapa/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><FatturaElettronicaBody></FatturaElettronicaBody></p:FatturaElettronica> ','SimpleXMLElement', LIBXML_NOCDATA); /* creo un DOMElements dal SimpleXMLElements */ $domdocument = dom_import_simplexml($fc); $domdocument->formatOutput = true; $doc = simplexml_load_string('<FatturaElettronicaHeader></FatturaElettronicaHeader>','SimpleXMLElement', LIBXML_NOCDATA); $headerdoc = dom_import_simplexml($doc ); $node = dom_import_simplexml(getDatiTrasmissione()); $node = $headerdoc->ownerDocument->importNode($node, TRUE); // And then append it to the "<root>" node $headerdoc->appendChild($node); $dt = $domdocument->ownerDocument->importNode($headerdoc, TRUE); $domdocument->appendChild($dt); echo $fc->asXML();

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.40.0180.00419.22
8.3.30.0170.00019.38
8.3.20.0000.00820.54
8.3.10.0080.00023.89
8.3.00.0120.00018.00
8.2.170.0140.00722.96
8.2.160.0100.00720.81
8.2.150.0050.00324.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0030.00722.42
8.2.110.0060.00322.58
8.2.100.0070.00418.29
8.2.90.0120.00318.34
8.2.80.0030.00618.00
8.2.70.0090.00217.75
8.2.60.0060.00318.30
8.2.50.0030.00718.07
8.2.40.0040.00420.18
8.2.30.0000.00718.38
8.2.20.0050.00318.04
8.2.10.0040.00418.43
8.2.00.0070.00017.89
8.1.270.0050.00324.04
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00624.27
8.1.230.0090.00321.34
8.1.220.0080.00018.14
8.1.210.0000.01018.77
8.1.200.0060.00317.73
8.1.190.0040.00417.60
8.1.180.0030.00618.10
8.1.170.0030.00518.87
8.1.160.0040.00422.32
8.1.150.0040.00418.94
8.1.140.0040.00417.64
8.1.130.0000.00718.14
8.1.120.0040.00417.76
8.1.110.0000.00717.74
8.1.100.0040.00417.75
8.1.90.0030.00517.58
8.1.80.0040.00417.75
8.1.70.0000.00717.59
8.1.60.0030.00617.80
8.1.50.0080.00017.71
8.1.40.0000.00817.89
8.1.30.0080.00017.85
8.1.20.0060.00317.87
8.1.10.0000.00717.92
8.1.00.0040.00417.72
8.0.300.0030.00620.46
8.0.290.0000.00817.13
8.0.280.0020.00518.76
8.0.270.0030.00317.63
8.0.260.0000.00717.62
8.0.250.0070.00017.26
8.0.240.0050.00217.27
8.0.230.0030.00317.23
8.0.220.0030.00317.04
8.0.210.0000.00717.21
8.0.200.0000.00617.21
8.0.190.0070.00017.11
8.0.180.0030.00617.21
8.0.170.0040.00417.06
8.0.160.0070.00017.16
8.0.150.0000.00716.96
8.0.140.0080.00017.20
8.0.130.0080.00013.50
8.0.120.0040.00417.13
8.0.110.0050.00317.10
8.0.100.0030.00617.24
8.0.90.0000.00716.87
8.0.80.0000.01517.14
8.0.70.0070.00016.86
8.0.60.0020.00517.18
8.0.50.0040.00417.08
8.0.30.0130.00817.44
8.0.20.0140.00617.40
8.0.10.0080.00017.20
8.0.00.0110.00916.96
7.4.330.0050.00015.28
7.4.320.0000.00616.84
7.4.300.0040.00416.85
7.4.290.0040.00416.83
7.4.280.0070.00317.02
7.4.270.0070.00016.82
7.4.260.0000.00716.78
7.4.250.0040.00416.93
7.4.240.0050.00216.94
7.4.230.0000.00716.68
7.4.220.0130.00616.97
7.4.210.0060.00916.84
7.4.200.0040.00416.64
7.4.190.0080.00016.99
7.4.160.0150.00916.65
7.4.150.0120.00617.40
7.4.140.0110.00617.86
7.4.130.0070.01316.88
7.4.120.0090.01016.78
7.4.110.0090.00916.70
7.4.100.0090.00916.82
7.4.90.0100.01416.80
7.4.80.0090.00919.39
7.4.70.0080.00816.78
7.4.60.0070.01016.62
7.4.50.0080.00016.85
7.4.40.0120.00316.95
7.4.30.0100.00716.71
7.4.00.0140.00015.23
7.3.330.0050.00013.48
7.3.320.0030.00313.49
7.3.310.0040.00416.32
7.3.300.0030.00316.56
7.3.290.0070.00716.50
7.3.280.0090.01116.52
7.3.270.0070.01017.40
7.3.260.0130.00616.68
7.3.250.0130.00416.70
7.3.240.0130.00316.80
7.3.230.0070.01616.52
7.3.210.0060.01016.77
7.3.200.0030.01519.39
7.3.190.0130.01016.81
7.3.180.0100.00616.92
7.3.170.0130.00616.46
7.3.160.0150.00316.76
7.3.120.0090.00615.09
7.2.330.0090.00917.17
7.2.320.0100.00716.87
7.2.310.0150.00616.81
7.2.300.0100.00717.03
7.2.290.0130.00717.14
7.2.110.0040.00816.70
7.2.100.0060.00616.71
7.2.90.0100.00316.87
7.2.80.0060.00616.85
7.2.70.0100.00616.88
7.2.60.0050.00617.11
7.2.50.0110.00317.23
7.2.40.0140.00017.13
7.2.30.0000.01417.05
7.2.20.0060.00617.13
7.2.10.0040.00816.83
7.2.00.0050.01018.44
7.1.230.0030.00915.77
7.1.220.0040.00815.79
7.1.210.0030.01015.78
7.1.200.0050.00716.02
7.1.190.0000.01415.97
7.1.180.0030.01015.93
7.1.170.0070.00315.68
7.1.160.0000.00915.89
7.1.150.0060.00616.04
7.1.140.0030.01015.95
7.1.130.0090.00615.75
7.1.120.0040.00415.88
7.1.110.0060.00815.93
7.1.100.0060.00717.32
7.1.90.0030.01016.13
7.1.80.0030.01015.92
7.1.70.0020.01016.59
7.1.60.0100.00817.78
7.1.50.0130.00716.61
7.1.40.0070.01115.86
7.1.30.0060.00615.99
7.1.20.0110.00616.16
7.1.10.0060.00615.68
7.1.00.0030.04019.25
7.0.310.0000.01315.32
7.0.300.0040.00415.39
7.0.290.0100.00615.59
7.0.280.0070.00415.69
7.0.270.0080.00015.31
7.0.260.0000.01315.46
7.0.250.0040.00415.73
7.0.240.0060.00615.63
7.0.230.0030.01115.44
7.0.220.0060.00615.72
7.0.210.0040.01115.62
7.0.200.0030.00616.23
7.0.190.0040.00815.49
7.0.180.0060.00615.69
7.0.170.0060.00615.60
7.0.160.0090.00315.54
7.0.150.0080.00415.62
7.0.140.0060.04018.86
7.0.130.0040.00415.69
7.0.120.0000.00915.53
7.0.110.0030.00615.46
7.0.100.0060.00915.69
7.0.90.0000.01515.60
7.0.80.0000.01115.50
7.0.70.0070.00715.72
7.0.60.0050.04517.86
7.0.50.0130.02816.80
7.0.40.0070.03916.84
7.0.30.0120.02216.91
7.0.20.0180.02817.02
7.0.10.0070.03316.93
7.0.00.0030.04316.94
5.6.380.0060.00614.63
5.6.370.0000.01314.69
5.6.360.0100.00314.78
5.6.350.0110.00414.42
5.6.340.0090.00614.65
5.6.330.0070.00414.76
5.6.320.0040.01114.53
5.6.310.0120.00314.64
5.6.300.0030.00814.75
5.6.290.0060.00614.63
5.6.280.0030.04317.83
5.6.270.0060.00614.38
5.6.260.0030.00914.63
5.6.250.0000.01114.57
5.6.240.0090.00314.33
5.6.230.0070.00714.68
5.6.220.0040.01114.29
5.6.210.0120.04217.39
5.6.200.0050.03516.46
5.6.190.0050.04017.58
5.6.180.0030.02717.53
5.6.170.0110.02517.44
5.6.160.0050.03117.62
5.6.150.0030.04616.41
5.6.140.0020.03016.50
5.6.130.0100.04216.57
5.6.120.0030.03417.77
5.6.110.0120.04017.80
5.6.100.0100.04317.73
5.6.90.0120.03917.82
5.6.80.0130.03717.46
5.6.70.0040.01114.72
5.6.60.0070.01014.21
5.6.50.0000.01514.20
5.6.40.0070.01014.78
5.6.30.0120.00314.67
5.6.20.0100.00714.54
5.6.10.0030.00614.44
5.6.00.0080.00814.38
5.5.380.0040.00412.79
5.5.370.0050.00212.79
5.5.360.0030.00312.79
5.5.350.0060.03116.68
5.5.340.0050.04315.48
5.5.330.0100.04216.58
5.5.320.0180.04016.69
5.5.310.0150.03016.61
5.5.300.0050.04515.51
5.5.290.0050.02815.40
5.5.280.0000.02816.86
5.5.270.0060.04716.87
5.5.260.0030.03116.84
5.5.250.0050.04516.72
5.5.240.0050.02516.50
5.5.230.0060.00312.79
5.5.220.0040.00812.79
5.5.210.0000.01112.79
5.5.200.0000.00912.79
5.5.190.0000.01212.79
5.5.180.0060.00612.79
5.5.170.0030.01014.55
5.5.160.0050.00212.79
5.5.150.0030.00312.79
5.5.140.0040.00412.79
5.5.130.0080.00412.79
5.5.120.0090.00312.79
5.5.110.0070.00312.79
5.5.100.0000.00612.79
5.5.90.0000.01212.79
5.5.80.0040.00412.79
5.5.70.0000.00812.79
5.5.60.0030.00812.79
5.5.50.0090.00012.79
5.5.40.0060.00312.79
5.5.30.0040.00412.79
5.5.20.0080.00312.79
5.5.10.0000.00912.79
5.5.00.0090.00012.79
5.4.450.0050.03516.23
5.4.440.0530.03316.10
5.4.430.0480.03516.26
5.4.420.0350.04516.16
5.4.410.0550.02716.11
5.4.400.0270.03516.00
5.4.390.0530.03016.00
5.4.380.0210.03015.79
5.4.370.0170.02715.69
5.4.360.0170.02715.86
5.4.350.0150.03015.86
5.4.340.0250.03015.70
5.4.330.0090.00312.79
5.4.320.0070.01812.76
5.4.310.0040.02112.76
5.4.300.0080.02412.76
5.4.290.0040.02812.76
5.4.280.0050.02912.71
5.4.270.0060.02912.70
5.4.260.0050.02612.71
5.4.250.0090.04212.71
5.4.240.0060.03412.70
5.4.230.0110.04312.70
5.4.220.0050.03012.70
5.4.210.0060.02912.70
5.4.200.0060.02912.70
5.4.190.0040.02812.70
5.4.180.0070.02612.70
5.4.170.0060.03012.70
5.4.160.0060.02312.70
5.4.150.0030.02312.70
5.4.140.0060.02012.54
5.4.130.0070.02312.53
5.4.120.0070.02112.52
5.4.110.0070.02012.51
5.4.100.0060.02112.51
5.4.90.0110.03312.51
5.4.80.0090.02812.51
5.4.70.0070.02812.51
5.4.60.0060.02112.51
5.4.50.0060.02412.51
5.4.40.0130.05212.50
5.4.30.0080.02312.50
5.4.20.0050.02712.50
5.4.10.0040.02912.50
5.4.00.0070.03712.25
5.3.290.0100.01912.88
5.3.280.0080.02912.85
5.3.270.0090.02912.86
5.3.260.0070.03012.86
5.3.250.0070.02812.86
5.3.240.0100.02612.86
5.3.230.0080.02112.85
5.3.220.0110.02212.84
5.3.210.0100.02612.84
5.3.200.0100.02312.84
5.3.190.0040.02412.84
5.3.180.0060.02312.84
5.3.170.0050.02112.84
5.3.160.0110.02312.84
5.3.150.0110.02412.84
5.3.140.0030.03012.83
5.3.130.0140.02212.83
5.3.120.0100.02012.83
5.3.110.0080.02212.83
5.3.100.0090.02212.57
5.3.90.0040.02412.56
5.3.80.0050.02212.56
5.3.70.0050.02412.56
5.3.60.0050.02312.55
5.3.50.0090.02112.52
5.3.40.0050.02212.52
5.3.30.0050.02212.50
5.3.20.0090.01912.40
5.3.10.0050.02112.38
5.3.00.0070.02012.38
5.2.170.0040.01911.12
5.2.160.0070.01811.12
5.2.150.0070.01611.12
5.2.140.0070.01711.12
5.2.130.0050.01811.10
5.2.120.0060.01511.10
5.2.110.0060.01711.10
5.2.100.0020.01911.10
5.2.90.0080.01411.10
5.2.80.0100.02411.10
5.2.70.0080.02111.10
5.2.60.0070.02311.08
5.2.50.0060.02111.06
5.2.40.0100.02211.05
5.2.30.0100.03911.04
5.2.20.0020.02611.03
5.2.10.0040.02310.98
5.2.00.0090.02310.91
5.1.60.0060.01710.55
5.1.50.0030.02110.55
5.1.40.0050.01910.54
5.1.30.0060.01610.72
5.1.20.0050.01510.72
5.1.10.0080.01510.59
5.1.00.0090.02210.59
5.0.50.0020.0149.72
5.0.40.0040.0139.65
5.0.30.0030.0209.56
5.0.20.0030.0149.54
5.0.10.0020.0169.53
5.0.00.0080.0249.53
4.4.90.0010.0118.78
4.4.80.0020.0108.77
4.4.70.0040.0098.77
4.4.60.0010.0128.77
4.4.50.0040.0088.78
4.4.40.0030.0158.75
4.4.30.0030.0098.78
4.4.20.0060.0078.82
4.4.10.0040.0108.82
4.4.00.0030.0158.78
4.3.110.0020.0148.73
4.3.100.0040.0108.73
4.3.90.0020.0148.71
4.3.80.0050.0148.69
4.3.70.0030.0108.71
4.3.60.0020.0138.71
4.3.50.0050.0118.71
4.3.40.0040.0188.66
4.3.30.0010.0158.05
4.3.20.0020.0138.04
4.3.10.0020.0138.02
4.3.00.0030.00814.41

preferences:
44.11 ms | 400 KiB | 5 Q