3v4l.org

run code in 300+ PHP versions simultaneously
<?php $site = new DOMDocument(); $div = $site->createElement("div"); $class = $site->createAttribute("class"); $class->nodeValue = "wrapper"; $div->appendChild($class); $site->appendChild($div); $html = $site->saveHTML(); echo $html;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0U9aN
function name:  (null)
number of ops:  24
compiled vars:  !0 = $site, !1 = $div, !2 = $class, !3 = $html
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    3     3        INIT_METHOD_CALL                                         !0, 'createElement'
          4        SEND_VAL_EX                                              'div'
          5        DO_FCALL                                      0  $7      
          6        ASSIGN                                                   !1, $7
    5     7        INIT_METHOD_CALL                                         !0, 'createAttribute'
          8        SEND_VAL_EX                                              'class'
          9        DO_FCALL                                      0  $9      
         10        ASSIGN                                                   !2, $9
    6    11        ASSIGN_OBJ                                               !2, 'nodeValue'
         12        OP_DATA                                                  'wrapper'
    8    13        INIT_METHOD_CALL                                         !1, 'appendChild'
         14        SEND_VAR_EX                                              !2
         15        DO_FCALL                                      0          
    9    16        INIT_METHOD_CALL                                         !0, 'appendChild'
         17        SEND_VAR_EX                                              !1
         18        DO_FCALL                                      0          
   10    19        INIT_METHOD_CALL                                         !0, 'saveHTML'
         20        DO_FCALL                                      0  $14     
         21        ASSIGN                                                   !3, $14
   12    22        ECHO                                                     !3
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.52 ms | 1398 KiB | 13 Q