3v4l.org

run code in 300+ PHP versions simultaneously
<?php $XMLtoNAP = new SimpleXMLElement("<request></request>"); $XMLtoNAP->addAttribute('newsPagePrefix', 'value goes here'); $newsIntro = $XMLtoNAP->addChild('content'); $newsIntro->addAttribute('type', 'latest'); Header('Content-type: text/xml'); echo $XMLtoNAP->asXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kjAqq
function name:  (null)
number of ops:  23
compiled vars:  !0 = $XMLtoNAP, !1 = $newsIntro
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'SimpleXMLElement'
          1        SEND_VAL_EX                                              '%3Crequest%3E%3C%2Frequest%3E'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    4     4        INIT_METHOD_CALL                                         !0, 'addAttribute'
          5        SEND_VAL_EX                                              'newsPagePrefix'
          6        SEND_VAL_EX                                              'value+goes+here'
          7        DO_FCALL                                      0          
    5     8        INIT_METHOD_CALL                                         !0, 'addChild'
          9        SEND_VAL_EX                                              'content'
         10        DO_FCALL                                      0  $6      
         11        ASSIGN                                                   !1, $6
    6    12        INIT_METHOD_CALL                                         !1, 'addAttribute'
         13        SEND_VAL_EX                                              'type'
         14        SEND_VAL_EX                                              'latest'
         15        DO_FCALL                                      0          
    7    16        INIT_FCALL                                               'header'
         17        SEND_VAL                                                 'Content-type%3A+text%2Fxml'
         18        DO_ICALL                                                 
    8    19        INIT_METHOD_CALL                                         !0, 'asXML'
         20        DO_FCALL                                      0  $10     
         21        ECHO                                                     $10
         22      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.42 ms | 1395 KiB | 15 Q