3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $dom = new DOMDocument(); $xpath = new DOMXpath($dom); if (!isset($xpath->document)) { $xpath->document = $dom; } var_dump($xpath);
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
Jump found. Position 1 = -2
Branch analysis from position: 12
filename:       /in/ia82d
function name:  (null)
number of ops:  16
compiled vars:  !0 = $dom, !1 = $xpath
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   NEW                                              $2      :-6
         1        DO_FCALL                                      0          
         2        ASSIGN                                                   !0, $2
   4     3        NEW                                              $5      :-4
         4        SEND_VAR_EX                                              !0
         5        DO_FCALL                                      0          
         6        ASSIGN                                                   !1, $5
   5     7        ISSET_ISEMPTY_PROP_OBJ                           ~8      !1, 'document'
         8        BOOL_NOT                                         ~9      ~8
         9      > JMPZ                                                     ~9, ->12
   6    10    >   ASSIGN_OBJ                                               !1, 'document'
        11        OP_DATA                                                  !0
   9    12    >   INIT_FCALL                                               'var_dump'
        13        SEND_VAR                                                 !1
        14        DO_ICALL                                                 
        15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0