3v4l.org

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

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

End of function getclass

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.1 ms | 1394 KiB | 15 Q