3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $writer = new SimpleXMLElement('<?xml version="1.0"?><dsr:SalesReportToSocietyMessage xmlns:dsr="http://ddex.net/xml/2010/dsr-main/32" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" MessageSchemaVersionId="2010/dsr-main/32" xsi:schemaLocation="http://ddex.net/xml/2010/dsr-main/32 http://ddex.net/xml/2010/dsr-main/32/dsr-main.xsd"><MessageHeader><MessageThreadId>0000000024</MessageThreadId><MessageId>000000002401</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-30T14:14:29</MessageCreatedDateTime></MessageHeader><MessageNotificationPeriod><StartDate>2013-01-01</StartDate><EndDate>2013-03-31</EndDate></MessageNotificationPeriod></dsr:SalesReportToSocietyMessage>'); $messagerecipient = $writer->xpath('MessageRecipient'); $messagerecipient[0]->PartyId = '1234'; $output = $writer->asXML(); echo $output; ?>
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/q105Y
function name:  (null)
number of ops:  16
compiled vars:  !0 = $writer, !1 = $messagerecipient, !2 = $output
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   2     0  E >   NEW                                              $3      :-6
         1        SEND_VAL_EX                                              '%3C%3Fxml+version%3D%221.0%22%3F%3E%3Cdsr%3ASalesReportToSocietyMessage+xmlns%3Adsr%3D%22http%3A%2F%2Fddex.net%2Fxml%2F2010%2Fdsr-main%2F32%22+xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22+MessageSchemaVersionId%3D%222010%2Fdsr-main%2F32%22+xsi%3AschemaLocation%3D%22http%3A%2F%2Fddex.net%2Fxml%2F2010%2Fdsr-main%2F32+http%3A%2F%2Fddex.net%2Fxml%2F2010%2Fdsr-main%2F32%2Fdsr-main.xsd%22%3E%3CMessageHeader%3E%3CMessageThreadId%3E0000000024%3C%2FMessageThreadId%3E%3CMessageId%3E000000002401%3C%2FMessageId%3E%3CMessageSender%3E%3CPartyId%3EPADPIDA2010071901R%3C%2FPartyId%3E%3CPartyName%3E%3CFullName%3ERHAPSODY+INTERNATIONAL%2C+INC.%3C%2FFullName%3E%3C%2FPartyName%3E%3CTradingName%3EPremier+Extra%3C%2FTradingName%3E%3C%2FMessageSender%3E%3CMessageRecipient%3E%3CPartyId%3ESWAPFORSOCIETYID%3C%2FPartyId%3E%3CPartyName%3E%3CFullName%3ESWAPFORSOCIETYNAME%3C%2FFullName%3E%3C%2FPartyName%3E%3C%2FMessageRecipient%3E%3CMessageCreatedDateTime%3E2014-06-30T14%3A14%3A29%3C%2FMessageCreatedDateTime%3E%3C%2FMessageHeader%3E%3CMessageNotificationPeriod%3E%3CStartDate%3E2013-01-01%3C%2FStartDate%3E%3CEndDate%3E2013-03-31%3C%2FEndDate%3E%3C%2FMessageNotificationPeriod%3E%3C%2Fdsr%3ASalesReportToSocietyMessage%3E'
         2        DO_FCALL                                      0          
         3        ASSIGN                                                   !0, $3
   4     4        INIT_METHOD_CALL                                         !0, 'xpath'
         5        SEND_VAL_EX                                              'MessageRecipient'
         6        DO_FCALL                                      0  $6      
         7        ASSIGN                                                   !1, $6
   5     8        FETCH_DIM_W                                      $8      !1, 0
         9        ASSIGN_OBJ                                               $8, 'PartyId'
        10        OP_DATA                                                  '1234'
   7    11        INIT_METHOD_CALL                                         !0, 'asXML'
        12        DO_FCALL                                      0  $10     
        13        ASSIGN                                                   !2, $10
   9    14        ECHO                                                     !2
        15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0