3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<'HTML' <p>mon texte de début</p> <pre> <?php # Pour afficher un tableau PHP $var['website'] = 'domain.tld'; $var['weblink'] = 'http://www.domain.tld'; # BUG ICI echo '<pre>'.print_r($var,1).'</pre>' echo 'My domain : '.$var['website'] ?> </pre> <p>mon texte de fin.</p> HTML; libxml_use_internal_errors(true); $dom = new DOMDocument; $dom->loadHTML('<html><head><meta charset="UTF-8"/></head><body>' . $text . '</body></html>'); foreach($dom->getElementsByTagName('body')->item(0)->childNodes as $childNode) { echo $dom->saveHTML($childNode); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 26
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 26
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 26
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/bCki5
function name:  (null)
number of ops:  28
compiled vars:  !0 = $text, !1 = $dom, !2 = $childNode
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cp%3Emon+texte+de+d%C3%A9but%3C%2Fp%3E%0A%0A%3Cpre%3E%0A%0A%3C%3Fphp%0A%0A%23+Pour+afficher+un+tableau+PHP%0A%0A%24var%5B%27website%27%5D+%3D+%27domain.tld%27%3B%0A%24var%5B%27weblink%27%5D+%3D+%27http%3A%2F%2Fwww.domain.tld%27%3B%0A%0A%23+BUG+ICI%0Aecho+%27%3Cpre%3E%27.print_r%28%24var%2C1%29.%27%3C%2Fpre%3E%27%0A%0Aecho+%27My+domain+%3A+%27.%24var%5B%27website%27%5D%0A%0A%3F%3E%0A%3C%2Fpre%3E%0A%0A%3Cp%3Emon+texte+de+fin.%3C%2Fp%3E%0A%0A'
   28     1        INIT_FCALL                                               'libxml_use_internal_errors'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                                 
   29     4        NEW                                              $5      'DOMDocument'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
   30     7        INIT_METHOD_CALL                                         !1, 'loadHTML'
          8        CONCAT                                           ~8      '%3Chtml%3E%3Chead%3E%3Cmeta+charset%3D%22UTF-8%22%2F%3E%3C%2Fhead%3E%3Cbody%3E', !0
          9        CONCAT                                           ~9      ~8, '%3C%2Fbody%3E%3C%2Fhtml%3E'
         10        SEND_VAL_EX                                              ~9
         11        DO_FCALL                                      0          
   31    12        INIT_METHOD_CALL                                         !1, 'getElementsByTagName'
         13        SEND_VAL_EX                                              'body'
         14        DO_FCALL                                      0  $11     
         15        INIT_METHOD_CALL                                         $11, 'item'
         16        SEND_VAL_EX                                              0
         17        DO_FCALL                                      0  $12     
         18        FETCH_OBJ_R                                      ~13     $12, 'childNodes'
         19      > FE_RESET_R                                       $14     ~13, ->26
         20    > > FE_FETCH_R                                               $14, !2, ->26
   32    21    >   INIT_METHOD_CALL                                         !1, 'saveHTML'
         22        SEND_VAR_EX                                              !2
         23        DO_FCALL                                      0  $15     
         24        ECHO                                                     $15
   31    25      > JMP                                                      ->20
         26    >   FE_FREE                                                  $14
   33    27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.4 ms | 998 KiB | 14 Q