3v4l.org

run code in 300+ PHP versions simultaneously
<?php $currentPayment = new SimpleXMLElement('<payment></payment>'); $currentPayment->addChild('creditCard'); $currentPayment->creditCard->addChild('cardNumber', 'XXXX0027'); $currentPayment->creditCard->addChild('expirationDate', 'XXXX'); echo $paymentProfile->asXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/R2uZE
function name:  (null)
number of ops:  21
compiled vars:  !0 = $currentPayment, !1 = $paymentProfile
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   NEW                                              $2      'SimpleXMLElement'
          1        SEND_VAL_EX                                              '%3Cpayment%3E%3C%2Fpayment%3E'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    5     4        INIT_METHOD_CALL                                         !0, 'addChild'
          5        SEND_VAL_EX                                              'creditCard'
          6        DO_FCALL                                      0          
    6     7        FETCH_OBJ_R                                      ~6      !0, 'creditCard'
          8        INIT_METHOD_CALL                                         ~6, 'addChild'
          9        SEND_VAL_EX                                              'cardNumber'
         10        SEND_VAL_EX                                              'XXXX0027'
         11        DO_FCALL                                      0          
    7    12        FETCH_OBJ_R                                      ~8      !0, 'creditCard'
         13        INIT_METHOD_CALL                                         ~8, 'addChild'
         14        SEND_VAL_EX                                              'expirationDate'
         15        SEND_VAL_EX                                              'XXXX'
         16        DO_FCALL                                      0          
   10    17        INIT_METHOD_CALL                                         !1, 'asXML'
         18        DO_FCALL                                      0  $10     
         19        ECHO                                                     $10
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.69 ms | 1394 KiB | 13 Q