3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(); ?> <div> <h1>Example Domain</h1> <p>This domain is established to be used for illustrative examples in documents. You may use this domain in examples without prior coordination or asking for permission.</p> <p><a href="http://www.iana.org/domains/example">More information...</a></p> </div> <?php $c = ob_get_clean(); if( ! class_exists('DOMDocument') ) exit("DOMDocument not here"); $doc = new DOMDocument(); $doc->loadHTML("<html><body>Test<br></body></html>"); print_r( $doc->childNodes ); echo PHP_EOL.PHP_EOL; $doc->loadHTML($c); print_r( $doc->childNodes );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WRYiO
function name:  (null)
number of ops:  31
compiled vars:  !0 = $c, !1 = $doc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'ob_start'
          1        DO_ICALL                                                 
    5     2        ECHO                                                     '%3Cdiv%3E%0A++++%3Ch1%3EExample+Domain%3C%2Fh1%3E%0A++++%3Cp%3EThis+domain+is+established+to+be+used+for+illustrative+examples+in+documents.+You+may+use+this%0A++++domain+in+examples+without+prior+coordination+or+asking+for+permission.%3C%2Fp%3E%0A++++%3Cp%3E%3Ca+href%3D%22http%3A%2F%2Fwww.iana.org%2Fdomains%2Fexample%22%3EMore+information...%3C%2Fa%3E%3C%2Fp%3E%0A%3C%2Fdiv%3E%0A'
   13     3        INIT_FCALL                                               'ob_get_clean'
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !0, $3
   15     6        INIT_FCALL                                               'class_exists'
          7        SEND_VAL                                                 'DOMDocument'
          8        DO_ICALL                                         $5      
          9        BOOL_NOT                                         ~6      $5
         10      > JMPZ                                                     ~6, ->12
         11    > > EXIT                                                     'DOMDocument+not+here'
   17    12    >   NEW                                              $7      'DOMDocument'
         13        DO_FCALL                                      0          
         14        ASSIGN                                                   !1, $7
   18    15        INIT_METHOD_CALL                                         !1, 'loadHTML'
         16        SEND_VAL_EX                                              '%3Chtml%3E%3Cbody%3ETest%3Cbr%3E%3C%2Fbody%3E%3C%2Fhtml%3E'
         17        DO_FCALL                                      0          
   19    18        INIT_FCALL                                               'print_r'
         19        FETCH_OBJ_R                                      ~11     !1, 'childNodes'
         20        SEND_VAL                                                 ~11
         21        DO_ICALL                                                 
   21    22        ECHO                                                     '%0A%0A'
   23    23        INIT_METHOD_CALL                                         !1, 'loadHTML'
         24        SEND_VAR_EX                                              !0
         25        DO_FCALL                                      0          
   24    26        INIT_FCALL                                               'print_r'
         27        FETCH_OBJ_R                                      ~14     !1, 'childNodes'
         28        SEND_VAL                                                 ~14
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.13 ms | 1396 KiB | 21 Q