3v4l.org

run code in 300+ PHP versions simultaneously
<?php $writer = new SimpleXMLElement('<?xml version="1.0"?><MessageHeader><MessageThreadId>0000000022</MessageThreadId><MessageId>000000002201</MessageId><MessageSender><PartyId>PADPIDA2010071901R</PartyId><PartyName><FullName>RHAPSODY INTERNATIONAL, INC.</FullName></PartyName><TradingName>Premier Extra</TradingName></MessageSender><MessageRecipient><PartyId>SWAPFORSOCIETYID</PartyId><PartyName><FullName>SWAPFORSOCIETYNAME</FullName></PartyName></MessageRecipient><MessageCreatedDateTime>2014-06-30T09:35:57</MessageCreatedDateTime></MessageHeader>'); $messagerecipient = $writer->xpath('MessageRecipient'); //foreach($messagerecipient as $data){ //$data->PartyID = '1234'; //} //$output = $writer->asXML(); //echo $output; var_dump($messagerecipient); ?>
Output for git.master, git.master_jit, rfc.property-hooks
array(1) { [0]=> object(SimpleXMLElement)#2 (2) { ["PartyId"]=> string(16) "SWAPFORSOCIETYID" ["PartyName"]=> object(SimpleXMLElement)#3 (1) { ["FullName"]=> string(18) "SWAPFORSOCIETYNAME" } } }

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:
47.56 ms | 401 KiB | 8 Q