3v4l.org

run code in 300+ PHP versions simultaneously
<?php $domd=new DOMDocument(); $str = "DOMDocument"; var_dump($domd instanceof $str); var_dump($domd instanceof ("DOMDocument")); // ^ 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/EMRub
function name:  (null)
number of ops:  16
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                                                 
    6     9        INIT_FCALL                                               'var_dump'
         10        INSTANCEOF                                       ~10     !0, 'DOMDocument'
         11        SEND_VAL                                                 ~10
         12        DO_ICALL                                                 
   10    13        ASSIGN                                                   !2, '%0Avar_dump%28%24domd+instanceof+%22DOMDocument%22%29%3B%0A'
   13    14        INCLUDE_OR_EVAL                                          !2, EVAL
   14    15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
140.59 ms | 1431 KiB | 14 Q