3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = DOMDocument::loadHTML('Hello world<br> <br>&nbsp; &nbsp;'); $selector = new DOMXPath($doc); echo trim($selector->query('//text()') ->item(0) ->nodeValue);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CO0qn
function name:  (null)
number of ops:  20
compiled vars:  !0 = $doc, !1 = $selector
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_STATIC_METHOD_CALL                                  'DOMDocument', 'loadHTML'
          1        SEND_VAL                                                 'Hello+world%3Cbr%3E+%3Cbr%3E%26nbsp%3B+%26nbsp%3B'
          2        DO_FCALL                                      0  $2      
          3        ASSIGN                                                   !0, $2
    4     4        NEW                                              $4      'DOMXPath'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !1, $4
    6     8        INIT_FCALL                                               'trim'
          9        INIT_METHOD_CALL                                         !1, 'query'
         10        SEND_VAL_EX                                              '%2F%2Ftext%28%29'
         11        DO_FCALL                                      0  $7      
    7    12        INIT_METHOD_CALL                                         $7, 'item'
         13        SEND_VAL_EX                                              0
         14        DO_FCALL                                      0  $8      
    8    15        FETCH_OBJ_R                                      ~9      $8, 'nodeValue'
         16        SEND_VAL                                                 ~9
         17        DO_ICALL                                         $10     
         18        ECHO                                                     $10
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.94 ms | 1395 KiB | 15 Q