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; ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
filename:       /in/2tGlN
function name:  (null)
number of ops:  19
compiled vars:  !0 = $writer, !1 = $messagerecipient, !2 = $data, !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%3CMessageHeader%3E%3CMessageThreadId%3E0000000022%3C%2FMessageThreadId%3E%3CMessageId%3E000000002201%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-30T09%3A35%3A57%3C%2FMessageCreatedDateTime%3E%3C%2FMessageHeader%3E'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
    4     4        INIT_METHOD_CALL                                         !0, 'xpath'
          5        SEND_VAL_EX                                              'MessageRecipient'
          6        DO_FCALL                                      0  $7      
          7        ASSIGN                                                   !1, $7
    5     8      > FE_RESET_R                                       $9      !1, ->13
          9    > > FE_FETCH_R                                               $9, !2, ->13
    6    10    >   ASSIGN_OBJ                                               !2, 'PartyID'
         11        OP_DATA                                                  '1234'
    5    12      > JMP                                                      ->9
         13    >   FE_FREE                                                  $9
    9    14        INIT_METHOD_CALL                                         !0, 'asXML'
         15        DO_FCALL                                      0  $11     
         16        ASSIGN                                                   !3, $11
   11    17        ECHO                                                     !3
   12    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.55 ms | 1394 KiB | 13 Q