3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dom = new DOMDocument(); $dom->loadHTML("<html></html>"); $nodes = $dom->getElementsByTagName("foo"); var_dump((bool)$nodes); if ($nodes) { echo "yes"; } else { echo "no"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sVuiD
function name:  (null)
number of ops:  19
compiled vars:  !0 = $dom, !1 = $nodes
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                                              '%3Chtml%3E%3C%2Fhtml%3E'
          5        DO_FCALL                                      0          
    6     6        INIT_METHOD_CALL                                         !0, 'getElementsByTagName'
          7        SEND_VAL_EX                                              'foo'
          8        DO_FCALL                                      0  $6      
          9        ASSIGN                                                   !1, $6
    8    10        INIT_FCALL                                               'var_dump'
         11        BOOL                                             ~8      !1
         12        SEND_VAL                                                 ~8
         13        DO_ICALL                                                 
   10    14      > JMPZ                                                     !1, ->17
   11    15    >   ECHO                                                     'yes'
         16      > JMP                                                      ->18
   13    17    >   ECHO                                                     'no'
   14    18    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.62 ms | 1395 KiB | 15 Q