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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.61 ms | 1393 KiB | 13 Q