3v4l.org

run code in 300+ PHP versions simultaneously
<?php $instance1 = new Test(); $instance2 = $instance1; $instance3 = & $instance1; var_dump($instance1 instanceof Test); // True var_dump($instance2 instanceof Test); // True var_dump($instance3 instanceof Test); // True $instance3 = new AnotherTest(); var_dump($instance1 instanceof AnotherTest); // True var_dump($instance2 instanceof AnotherTest); // False var_dump($instance3 instanceof AnotherTest); // True
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jIk1s
function name:  (null)
number of ops:  33
compiled vars:  !0 = $instance1, !1 = $instance2, !2 = $instance3
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $3      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    3     3        ASSIGN                                                   !1, !0
    4     4        ASSIGN_REF                                               !2, !0
    6     5        INIT_FCALL                                               'var_dump'
          6        INSTANCEOF                                       ~8      !0, 'Test'
          7        SEND_VAL                                                 ~8
          8        DO_ICALL                                                 
    7     9        INIT_FCALL                                               'var_dump'
         10        INSTANCEOF                                       ~10     !1, 'Test'
         11        SEND_VAL                                                 ~10
         12        DO_ICALL                                                 
    8    13        INIT_FCALL                                               'var_dump'
         14        INSTANCEOF                                       ~12     !2, 'Test'
         15        SEND_VAL                                                 ~12
         16        DO_ICALL                                                 
   10    17        NEW                                              $14     'AnotherTest'
         18        DO_FCALL                                      0          
         19        ASSIGN                                                   !2, $14
   12    20        INIT_FCALL                                               'var_dump'
         21        INSTANCEOF                                       ~17     !0, 'AnotherTest'
         22        SEND_VAL                                                 ~17
         23        DO_ICALL                                                 
   13    24        INIT_FCALL                                               'var_dump'
         25        INSTANCEOF                                       ~19     !1, 'AnotherTest'
         26        SEND_VAL                                                 ~19
         27        DO_ICALL                                                 
   14    28        INIT_FCALL                                               'var_dump'
         29        INSTANCEOF                                       ~21     !2, 'AnotherTest'
         30        SEND_VAL                                                 ~21
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.52 ms | 1396 KiB | 15 Q