3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $note=<<<XML <Clip> <ClipName>000228347</ClipName> <TimeCodeIn>01:00:00:00</TimeCodeIn> <TimeCodeOut>01:23:07:10</TimeCodeOut> <Duracao>00:23:07:10</Duracao> <Estado>Pronto para Emissão</Estado> <VersaoMedia>03- Original Version (dobrada PT-PT)</VersaoMedia> <Formato>4:3 Full Frame</Formato> <Qualidade>SD 16:9</Qualidade> <Som>2.0</Som> <TxReady>True</TxReady> <Titulo>Wow, Wow, Wubbzy - T1, 1</Titulo> <Observacoes>DR0002189<br/></Observacoes> <Ordem>1</Ordem> <Segmento> <Segmento> <VersaoSegmentacao>EMISSÃO</VersaoSegmentacao> <TimeCodeIn>01:00:00:00</TimeCodeIn> <TimeCodeOut>01:23:07:10</TimeCodeOut> <Duracao>00:23:07:10</Duracao> </Segmento> </Segmento> <ReferenciaExternaSerie>63470</ReferenciaExternaSerie> <ReferenciaExternaEpisodio>63470001</ReferenciaExternaEpisodio> <NumeroProcesso>14011726</NumeroProcesso> <Episodio>1</Episodio> <EpisodioTituloOriginal>Wow, Wow, Wubbzy - T1, 001</EpisodioTituloOriginal> <EpisodioTituloPortugues>Wow, Wow, Wubbzy - T1, 001</EpisodioTituloPortugues> <Temporada>T1</Temporada> <SerieTituloOriginal>Wow, Wow, Wubbzy - T1,</SerieTituloOriginal> <SerieTituloPortugues>Wow, Wow, Wubbzy - T1,</SerieTituloPortugues> <TipoConteudo>Programa</TipoConteudo> <Canal>Panda</Canal> <Distribuidor>Brands &amp; Rights 360, S.L.</Distribuidor> <RefExternaContrato>013067</RefExternaContrato> <ProximaData>2015-08-28T00:00:00</ProximaData> </Clip> <Clip> <ClipName>000228349</ClipName> <TimeCodeIn>01:00:00:00</TimeCodeIn> <TimeCodeOut>01:23:07:11</TimeCodeOut> <Duracao>00:23:07:11</Duracao> <Estado>Pronto para Emissão</Estado> <VersaoMedia>03- Original Version (dobrada PT-PT)</VersaoMedia> <Formato>4:3 Full Frame</Formato> <Qualidade>SD 16:9</Qualidade> <Som>2.0</Som> <TxReady>True</TxReady> <Titulo>Wow, Wow, Wubbzy - T1, 2</Titulo> <Observacoes>DR0002191<br/></Observacoes> <Ordem>1</Ordem> <Segmento> <Segmento> <VersaoSegmentacao>EMISSÃO</VersaoSegmentacao> <TimeCodeIn>01:00:00:00</TimeCodeIn> <TimeCodeOut>01:23:07:11</TimeCodeOut> <Duracao>00:23:07:11</Duracao> </Segmento> </Segmento> <ReferenciaExternaSerie>63470</ReferenciaExternaSerie> <ReferenciaExternaEpisodio>63470002</ReferenciaExternaEpisodio> <NumeroProcesso>14011726</NumeroProcesso> <Episodio>2</Episodio> <EpisodioTituloOriginal>Wow, Wow, Wubbzy - T1, 002</EpisodioTituloOriginal> <EpisodioTituloPortugues>Wow, Wow, Wubbzy - T1, 002</EpisodioTituloPortugues> <Temporada>T1</Temporada> <SerieTituloOriginal>Wow, Wow, Wubbzy - T1,</SerieTituloOriginal> <SerieTituloPortugues>Wow, Wow, Wubbzy - T1,</SerieTituloPortugues> <TipoConteudo>Programa</TipoConteudo> <Canal>Panda</Canal> <Distribuidor>Brands &amp; Rights 360, S.L.</Distribuidor> <RefExternaContrato>013067</RefExternaContrato> <ProximaData>2015-08-31T00:00:00</ProximaData> </Clip> XML; $xml=simplexml_load_string($note); //echo $xml->getName() . "<br>"; $a = $xml->asXML(); echo $a; $b = json_encode($a); echo $b;
based on dQ9jV
Output for 7.0.0 - 7.2.0
Warning: simplexml_load_string(): Entity: line 39: parser error : Extra content at the end of the document in /in/6YdqC on line 81 Warning: simplexml_load_string(): <Clip> in /in/6YdqC on line 81 Warning: simplexml_load_string(): ^ in /in/6YdqC on line 81 Fatal error: Uncaught Error: Call to a member function asXML() on boolean in /in/6YdqC:83 Stack trace: #0 {main} thrown in /in/6YdqC on line 83
Process exited with code 255.
Output for 5.6.0 - 5.6.28
Warning: simplexml_load_string(): Entity: line 39: parser error : Extra content at the end of the document in /in/6YdqC on line 81 Warning: simplexml_load_string(): <Clip> in /in/6YdqC on line 81 Warning: simplexml_load_string(): ^ in /in/6YdqC on line 81 Fatal error: Call to a member function asXML() on boolean in /in/6YdqC on line 83
Process exited with code 255.
Output for 5.4.0 - 5.5.38
Warning: simplexml_load_string(): Entity: line 39: parser error : Extra content at the end of the document in /in/6YdqC on line 81 Warning: simplexml_load_string(): <Clip> in /in/6YdqC on line 81 Warning: simplexml_load_string(): ^ in /in/6YdqC on line 81 Fatal error: Call to a member function asXML() on a non-object in /in/6YdqC on line 83
Process exited with code 255.