3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument(); $doc->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/7VO3j
function name:  (null)
number of ops:  22
compiled vars:  !0 = $doc, !1 = $selector
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    4     3        INIT_METHOD_CALL                                         !0, 'loadHTML'
          4        SEND_VAL_EX                                              'Hello+world%3Cbr%3E+%3Cbr%3E%26nbsp%3B+%26nbsp%3B'
          5        DO_FCALL                                      0          
    5     6        NEW                                              $6      'DOMXPath'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $6
    7    10        INIT_FCALL                                               'trim'
         11        INIT_METHOD_CALL                                         !1, 'query'
         12        SEND_VAL_EX                                              '%2F%2Ftext%28%29'
         13        DO_FCALL                                      0  $9      
    8    14        INIT_METHOD_CALL                                         $9, 'item'
         15        SEND_VAL_EX                                              0
         16        DO_FCALL                                      0  $10     
    9    17        FETCH_OBJ_R                                      ~11     $10, 'nodeValue'
         18        SEND_VAL                                                 ~11
         19        DO_ICALL                                         $12     
         20        ECHO                                                     $12
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.53 ms | 1395 KiB | 15 Q