3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = "<?xml version='1.0' encoding='utf-8'?><merchant><merchantID>33abc947-f7d5-45f7-9b99-6825b72b74db</merchantID></merchant> <transaction><merchantTransactionID>123456</merchantTransactionID><method>boleto</method><customerName>João Silva</customerName><CPF>36874950860</CPF><currency>BRL</currency><value>10000</value></transaction>"; $ler = simplexml_load_string($xml); echo 'teste<br>'; echo $ler->merchantID; ?>
Output for git.master, git.master_jit
Warning: simplexml_load_string(): Entity: line 2: parser error : Extra content at the end of the document in /in/2LQD4 on line 6 Warning: simplexml_load_string(): <transaction><merchantTransactionID>123456</merchantTransactionID><method>boleto in /in/2LQD4 on line 6 Warning: simplexml_load_string(): ^ in /in/2LQD4 on line 6 teste<br> Warning: Attempt to read property "merchantID" on bool in /in/2LQD4 on line 10
Output for rfc.property-hooks
Warning: simplexml_load_string(): Entity: line 2: parser error : Extra content at the end of the document in /in/2LQD4 on line 6 Warning: simplexml_load_string(): <transaction><merchantTransactionID>123456</merchantTransactionID><method>boleto in /in/2LQD4 on line 6 Warning: simplexml_load_string(): ^ in /in/2LQD4 on line 6 teste<br> Warning: Attempt to read property "merchantID" on false in /in/2LQD4 on line 10

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
42.02 ms | 401 KiB | 8 Q