3v4l.org

run code in 300+ PHP versions simultaneously
<?php $html = <<<HTML <form method="post"> <button>Hello</button> </form> HTML; $document = new DOMDocument("1.0", "utf-8"); $f = $document->createDocumentFragment(); $f->appendXML($html); var_dump($f->firstChild);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YlGnU
function name:  (null)
number of ops:  17
compiled vars:  !0 = $html, !1 = $document, !2 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cform+method%3D%22post%22%3E%0A++++%3Cbutton%3EHello%3C%2Fbutton%3E%0A%3C%2Fform%3E'
    9     1        NEW                                              $4      'DOMDocument'
          2        SEND_VAL_EX                                              '1.0'
          3        SEND_VAL_EX                                              'utf-8'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $4
   10     6        INIT_METHOD_CALL                                         !1, 'createDocumentFragment'
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !2, $7
   11     9        INIT_METHOD_CALL                                         !2, 'appendXML'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0          
   13    12        INIT_FCALL                                               'var_dump'
         13        FETCH_OBJ_R                                      ~10     !2, 'firstChild'
         14        SEND_VAL                                                 ~10
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.76 ms | 1394 KiB | 15 Q