3v4l.org

run code in 500+ PHP versions simultaneously
<?php $domd=new DOMDocument(); $str = "DOMDocument"; var_dump($domd instanceof $str); // ^ is legal. // V is illegal // var_dump($domd instanceof "DOMDocument"); $code = ' var_dump($domd instanceof "DOMDocument"); '; eval($code); // the eval hack is for illustration, make it an error at run-time, rather than compile-time.
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hVE15
function name:  (null)
number of ops:  12
compiled vars:  !0 = $domd, !1 = $str, !2 = $code
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   NEW                                                  $3      'DOMDocument'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $3
    4     3        ASSIGN                                                       !1, 'DOMDocument'
    5     4        INIT_FCALL                                                   'var_dump'
          5        FETCH_CLASS                                       0  $7      !1
          6        INSTANCEOF                                           ~8      !0, $7
          7        SEND_VAL                                                     ~8
          8        DO_ICALL                                                     
    9     9        ASSIGN                                                       !2, '%0Avar_dump%28%24domd+instanceof+%22DOMDocument%22%29%3B%0A'
   12    10        INCLUDE_OR_EVAL                                              !2, EVAL
   13    11      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
165.13 ms | 1732 KiB | 14 Q