3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dom = new DOMDocument(); $dom->loadHtml(' <html><head></head> <body> <div id="content"></div> </body> </html> '); $content = $dom->getElementById('content'); //NULL !?
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/If1N9
function name:  (null)
number of ops:  11
compiled vars:  !0 = $dom, !1 = $content
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $2      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    3     3        INIT_METHOD_CALL                                         !0, 'loadHtml'
          4        SEND_VAL_EX                                              '%0A++%3Chtml%3E%3Chead%3E%3C%2Fhead%3E%0A++++%3Cbody%3E%0A++++++%3Cdiv+id%3D%22content%22%3E%3C%2Fdiv%3E%0A++++%3C%2Fbody%3E%0A++%3C%2Fhtml%3E%0A'
          5        DO_FCALL                                      0          
   10     6        INIT_METHOD_CALL                                         !0, 'getElementById'
          7        SEND_VAL_EX                                              'content'
          8        DO_FCALL                                      0  $6      
          9        ASSIGN                                                   !1, $6
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.86 ms | 1393 KiB | 13 Q