3v4l.org

run code in 300+ PHP versions simultaneously
<?php $obj = new class() { private function foo() { } }; if (method_exists($obj, 'foo')) { $obj->foo(); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/4pBgc
function name:  (null)
number of ops:  12
compiled vars:  !0 = $obj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_ANON_CLASS                               <unknown> 
          1        NEW                                              $2      $1
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    9     4        INIT_FCALL                                               'method_exists'
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 'foo'
          7        DO_ICALL                                         $5      
          8      > JMPZ                                                     $5, ->11
   10     9    >   INIT_METHOD_CALL                                         !0, 'foo'
         10        DO_FCALL                                      0          
   11    11    > > RETURN                                                   1

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

End of function foo

End of class class@anonymous.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.63 ms | 1009 KiB | 14 Q