3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = new SimpleXMLElement('<xml/>', LIBXML_NOEMPTYTAG); $output = $xml->addChild('child1'); $output->addChild('child2', "value"); $output->noValue = ''; echo $xml->asXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/S2PKc
function name:  (null)
number of ops:  19
compiled vars:  !0 = $xml, !1 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'SimpleXMLElement'
          1        SEND_VAL_EX                                              '%3Cxml%2F%3E'
          2        SEND_VAL_EX                                              4
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
    4     5        INIT_METHOD_CALL                                         !0, 'addChild'
          6        SEND_VAL_EX                                              'child1'
          7        DO_FCALL                                      0  $5      
          8        ASSIGN                                                   !1, $5
    5     9        INIT_METHOD_CALL                                         !1, 'addChild'
         10        SEND_VAL_EX                                              'child2'
         11        SEND_VAL_EX                                              'value'
         12        DO_FCALL                                      0          
    6    13        ASSIGN_OBJ                                               !1, 'noValue'
         14        OP_DATA                                                  ''
    8    15        INIT_METHOD_CALL                                         !0, 'asXML'
         16        DO_FCALL                                      0  $9      
         17        ECHO                                                     $9
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.29 ms | 1447 KiB | 13 Q