3v4l.org

run code in 300+ PHP versions simultaneously
<?php $d=new DOMDocument(); $d->loadHTML('<html></html>'); $p=new DOMXPath($d); try{ $p->query('//html/head')->item(0)->getAttribute('rel'); }catch(Error $e){ print('Catched'); } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 20
Branch analysis from position: 20
2 jumps found. (Code = 107) Position 1 = 21, Position 2 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bhBLr
function name:  (null)
number of ops:  23
compiled vars:  !0 = $d, !1 = $p, !2 = $e
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                                              '%3Chtml%3E%3C%2Fhtml%3E'
          5        DO_FCALL                                      0          
    4     6        NEW                                              $7      'DOMXPath'
          7        SEND_VAR_EX                                              !0
          8        DO_FCALL                                      0          
          9        ASSIGN                                                   !1, $7
    7    10        INIT_METHOD_CALL                                         !1, 'query'
         11        SEND_VAL_EX                                              '%2F%2Fhtml%2Fhead'
         12        DO_FCALL                                      0  $10     
         13        INIT_METHOD_CALL                                         $10, 'item'
         14        SEND_VAL_EX                                              0
         15        DO_FCALL                                      0  $11     
         16        INIT_METHOD_CALL                                         $11, 'getAttribute'
         17        SEND_VAL_EX                                              'rel'
         18        DO_FCALL                                      0          
         19      > JMP                                                      ->22
    8    20  E > > CATCH                                       last         'Error'
    9    21    >   ECHO                                                     'Catched'
   11    22    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.74 ms | 995 KiB | 13 Q