3v4l.org

run code in 500+ PHP versions simultaneously
<?php class Foo { private function bar(): void {} } $f = new Foo(); var_dump(method_exists($f, 'bar')); var_dump(is_callable($f, 'bar'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7cKRe
function name:  (null)
number of ops:  18
compiled vars:  !0 = $f
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   NEW                                                  $1      'Foo'
          1        DO_FCALL                                          0          
          2        ASSIGN                                                       !0, $1
    8     3        INIT_FCALL                                                   'var_dump'
          4        INIT_FCALL                                                   'method_exists'
          5        SEND_VAR                                                     !0
          6        SEND_VAL                                                     'bar'
          7        DO_ICALL                                             $4      
          8        SEND_VAR                                                     $4
          9        DO_ICALL                                                     
    9    10        INIT_FCALL                                                   'var_dump'
         11        INIT_FCALL                                                   'is_callable'
         12        SEND_VAR                                                     !0
         13        SEND_VAL                                                     'bar'
         14        DO_ICALL                                             $6      
         15        SEND_VAR                                                     $6
         16        DO_ICALL                                                     
         17      > RETURN                                                       1

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

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.81 ms | 1380 KiB | 16 Q