3v4l.org

run code in 300+ PHP versions simultaneously
<?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'; $partyname = $writer->xpath('//MessageRecipient/PartyName'); $partyname[0]->FullName = 'ARESA'; //var_dump($messagerecipient); $output = $writer->asXML(); echo $output; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hvh8D
function name:  (null)
number of ops:  23
compiled vars:  !0 = $writer, !1 = $messagerecipient, !2 = $partyname, !3 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'SimpleXMLElement'
          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, $4
    4     4        INIT_METHOD_CALL                                         !0, 'xpath'
          5        SEND_VAL_EX                                              '%2F%2FMessageRecipient'
          6        DO_FCALL                                      0  $7      
          7        ASSIGN                                                   !1, $7
    5     8        FETCH_DIM_W                                      $9      !1, 0
          9        ASSIGN_OBJ                                               $9, 'PartyId'
         10        OP_DATA                                                  '1234'
    7    11        INIT_METHOD_CALL                                         !0, 'xpath'
         12        SEND_VAL_EX                                              '%2F%2FMessageRecipient%2FPartyName'
         13        DO_FCALL                                      0  $11     
         14        ASSIGN                                                   !2, $11
    8    15        FETCH_DIM_W                                      $13     !2, 0
         16        ASSIGN_OBJ                                               $13, 'FullName'
         17        OP_DATA                                                  'ARESA'
   14    18        INIT_METHOD_CALL                                         !0, 'asXML'
         19        DO_FCALL                                      0  $15     
         20        ASSIGN                                                   !3, $15
   16    21        ECHO                                                     !3
   17    22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.13 ms | 1386 KiB | 13 Q