3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Monkey { public function getMonkey(); } class Cage implements Monkey { public function getMonkey() { echo 'banana!'; } } $class = new Cage(); var_dump($class instanceof Monkey);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WY0Re
function name:  (null)
number of ops:  9
compiled vars:  !0 = $class
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   DECLARE_CLASS                                            'cage'
   15     1        NEW                                              $1      'Cage'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   16     4        INIT_FCALL                                               'var_dump'
          5        INSTANCEOF                                       ~4      !0, 'Monkey'
          6        SEND_VAL                                                 ~4
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

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

End of function getmonkey

End of class Monkey.

Class Cage:
Function getmonkey:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WY0Re
function name:  getMonkey
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ECHO                                                     'banana%21'
   12     1      > RETURN                                                   null

End of function getmonkey

End of class Cage.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.05 ms | 1386 KiB | 15 Q