3v4l.org

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

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

End of function test

End of class test.

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

End of function test

End of class testy.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.39 ms | 1395 KiB | 15 Q