3v4l.org

run code in 500+ PHP versions simultaneously
<?php $xml = new simplexmlelement('<?xml version="1.0" encoding="utf-8"?> <comments><comment> <user>User4251</user> <date>02.10.2018</date> <text>Comment body goes here</text> </comment> <comment> <user>User8650</user> <date>01.10.2018</date> <text>Comment body goes here</text> </comment></comments>'); $child = $xml->addchild('comment'); $child->addChild("user","User2245"); $child->addChild("date","02.10.2018"); $child->addChild("text","The comment text goes here"); echo $xml->asXML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Pln6U
function name:  (null)
number of ops:  24
compiled vars:  !0 = $xml, !1 = $child
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    2     0  E >   NEW                                                  $2      'simplexmlelement'
          1        SEND_VAL_EX                                                  '%3C%3Fxml+version%3D%221.0%22+encoding%3D%22utf-8%22%3F%3E%0A%3Ccomments%3E%3Ccomment%3E%0A++%3Cuser%3EUser4251%3C%2Fuser%3E%0A++%3Cdate%3E02.10.2018%3C%2Fdate%3E%0A++%3Ctext%3EComment+body+goes+here%3C%2Ftext%3E%0A%3C%2Fcomment%3E%0A%3Ccomment%3E%0A++%3Cuser%3EUser8650%3C%2Fuser%3E%0A++%3Cdate%3E01.10.2018%3C%2Fdate%3E%0A++%3Ctext%3EComment+body+goes+here%3C%2Ftext%3E%0A%3C%2Fcomment%3E%3C%2Fcomments%3E'
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $2
   13     4        INIT_METHOD_CALL                                             !0, 'addchild'
          5        SEND_VAL_EX                                                  'comment'
          6        DO_FCALL                                          0  $5      
          7        ASSIGN                                                       !1, $5
   14     8        INIT_METHOD_CALL                                             !1, 'addChild'
          9        SEND_VAL_EX                                                  'user'
         10        SEND_VAL_EX                                                  'User2245'
         11        DO_FCALL                                          0          
   15    12        INIT_METHOD_CALL                                             !1, 'addChild'
         13        SEND_VAL_EX                                                  'date'
         14        SEND_VAL_EX                                                  '02.10.2018'
         15        DO_FCALL                                          0          
   16    16        INIT_METHOD_CALL                                             !1, 'addChild'
         17        SEND_VAL_EX                                                  'text'
         18        SEND_VAL_EX                                                  'The+comment+text+goes+here'
         19        DO_FCALL                                          0          
   17    20        INIT_METHOD_CALL                                             !0, 'asXML'
         21        DO_FCALL                                          0  $10     
         22        ECHO                                                         $10
         23      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
201.09 ms | 2659 KiB | 13 Q