3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() { } } $class = 'string'; $callback = [new Foo(), 'bar']; var_dump($callback instanceof $class);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ASYc9
function name:  (null)
number of ops:  12
compiled vars:  !0 = $class, !1 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, 'string'
   11     1        NEW                                              $3      'Foo'
          2        DO_FCALL                                      0          
          3        INIT_ARRAY                                       ~5      $3
          4        ADD_ARRAY_ELEMENT                                ~5      'bar'
          5        ASSIGN                                                   !1, ~5
   13     6        INIT_FCALL                                               'var_dump'
          7        FETCH_CLASS                                   0  $7      !0
          8        INSTANCEOF                                       ~8      !1, $7
          9        SEND_VAL                                                 ~8
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ASYc9
function name:  bar
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.69 ms | 1394 KiB | 15 Q