3v4l.org

run code in 300+ PHP versions simultaneously
<?php $baseUrl = "<p id='categories'>Sports</p>"; $domdoc = new DOMDocument(); $domdoc->loadHTML($baseUrl); echo $domdoc->getElementById('categories')->nodeValue;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b7Gij
function name:  (null)
number of ops:  13
compiled vars:  !0 = $baseUrl, !1 = $domdoc
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, '%3Cp+id%3D%27categories%27%3ESports%3C%2Fp%3E'
    5     1        NEW                                              $3      'DOMDocument'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
    6     4        INIT_METHOD_CALL                                         !1, 'loadHTML'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
    8     7        INIT_METHOD_CALL                                         !1, 'getElementById'
          8        SEND_VAL_EX                                              'categories'
          9        DO_FCALL                                      0  $7      
         10        FETCH_OBJ_R                                      ~8      $7, 'nodeValue'
         11        ECHO                                                     ~8
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
124.69 ms | 1006 KiB | 13 Q