3v4l.org

run code in 300+ PHP versions simultaneously
<?php class simple2 extends SimpleXMLElement { } $xml = new simple2('<data/>'); $name="header and body"; $value="This & That"; $xml->$name=$value; $xml->$name->addChild("aaa", "bbb"); //$xml->addChild ($name, $value); print_r($xml);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/RUsbJ
function name:  (null)
number of ops:  17
compiled vars:  !0 = $xml, !1 = $name, !2 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $3      'simple2'
          1        SEND_VAL_EX                                              '%3Cdata%2F%3E'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   11     4        ASSIGN                                                   !1, 'header+and+body'
   12     5        ASSIGN                                                   !2, 'This+%26+That'
   13     6        ASSIGN_OBJ                                               !0, !1
          7        OP_DATA                                                  !2
   14     8        FETCH_OBJ_R                                      ~9      !0, !1
          9        INIT_METHOD_CALL                                         ~9, 'addChild'
         10        SEND_VAL_EX                                              'aaa'
         11        SEND_VAL_EX                                              'bbb'
         12        DO_FCALL                                      0          
   17    13        INIT_FCALL                                               'print_r'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Class simple2: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.72 ms | 1394 KiB | 15 Q