3v4l.org

run code in 300+ PHP versions simultaneously
<?php $doc = new DOMDocument; $doc->loadHTML( '<div id="wrapper_left">Some text</div>'); $xpath = new DOMXPath( $doc); $div = $xpath->query( '//div[@id="wrapper_left"]')->item(0); echo $div->textContents;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dl8se
function name:  (null)
number of ops:  20
compiled vars:  !0 = $doc, !1 = $xpath, !2 = $div
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'DOMDocument'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    3     3        INIT_METHOD_CALL                                         !0, 'loadHTML'
          4        SEND_VAL_EX                                              '%3Cdiv+id%3D%22wrapper_left%22%3ESome+text%3C%2Fdiv%3E'
          5        DO_FCALL                                      0          
    5     6        NEW                                              $7      'DOMXPath'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $7
    6    10        INIT_METHOD_CALL                                         !1, 'query'
         11        SEND_VAL_EX                                              '%2F%2Fdiv%5B%40id%3D%22wrapper_left%22%5D'
         12        DO_FCALL                                      0  $10     
         13        INIT_METHOD_CALL                                         $10, 'item'
         14        SEND_VAL_EX                                              0
         15        DO_FCALL                                      0  $11     
         16        ASSIGN                                                   !2, $11
    7    17        FETCH_OBJ_R                                      ~13     !2, 'textContents'
         18        ECHO                                                     ~13
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.69 ms | 1394 KiB | 13 Q