3v4l.org

run code in 300+ PHP versions simultaneously
<?php $title = 'Foo & Bar'; $content = '1 is < then 2'; $document = new DOMDocument(); $div = $document->appendChild($document->createElement('div')); $div->appendChild($document->createElement('h2'))->textContent = $title; $div->appendChild($document->createElement('p'))->textContent = $content; echo $document->saveHTML();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sMnK1
function name:  (null)
number of ops:  34
compiled vars:  !0 = $title, !1 = $content, !2 = $document, !3 = $div
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Foo+%26+Bar'
    4     1        ASSIGN                                                   !1, '1+is+%3C+then+2'
    6     2        NEW                                              $6      'DOMDocument'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !2, $6
    7     5        INIT_METHOD_CALL                                         !2, 'appendChild'
          6        INIT_METHOD_CALL                                         !2, 'createElement'
          7        SEND_VAL_EX                                              'div'
          8        DO_FCALL                                      0  $9      
          9        SEND_VAR_NO_REF_EX                                       $9
         10        DO_FCALL                                      0  $10     
         11        ASSIGN                                                   !3, $10
    8    12        INIT_METHOD_CALL                                         !3, 'appendChild'
         13        INIT_METHOD_CALL                                         !2, 'createElement'
         14        SEND_VAL_EX                                              'h2'
         15        DO_FCALL                                      0  $12     
         16        SEND_VAR_NO_REF_EX                                       $12
         17        DO_FCALL                                      0  $13     
         18        SEPARATE                                         $13     $13
         19        ASSIGN_OBJ                                               $13, 'textContent'
         20        OP_DATA                                                  !0
    9    21        INIT_METHOD_CALL                                         !3, 'appendChild'
         22        INIT_METHOD_CALL                                         !2, 'createElement'
         23        SEND_VAL_EX                                              'p'
         24        DO_FCALL                                      0  $15     
         25        SEND_VAR_NO_REF_EX                                       $15
         26        DO_FCALL                                      0  $16     
         27        SEPARATE                                         $16     $16
         28        ASSIGN_OBJ                                               $16, 'textContent'
         29        OP_DATA                                                  !1
   11    30        INIT_METHOD_CALL                                         !2, 'saveHTML'
         31        DO_FCALL                                      0  $18     
         32        ECHO                                                     $18
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.59 ms | 1000 KiB | 13 Q