3v4l.org

run code in 300+ PHP versions simultaneously
<?php class someClass { function someMethod() { } } $anObject = new someClass(); $methodVariable = array($anObject, 'someMethod'); var_dump(is_callable($methodVariable, true, $callable_name)); // bool(true)
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3l9DZ
function name:  (null)
number of ops:  15
compiled vars:  !0 = $anObject, !1 = $methodVariable, !2 = $callable_name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $3      'someClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
   12     3        INIT_ARRAY                                       ~6      !0
          4        ADD_ARRAY_ELEMENT                                ~6      'someMethod'
          5        ASSIGN                                                   !1, ~6
   14     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'is_callable'
          8        SEND_VAR                                                 !1
          9        SEND_VAL                                                 <true>
         10        SEND_REF                                                 !2
         11        DO_ICALL                                         $8      
         12        SEND_VAR                                                 $8
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function somemethod

End of class someClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.11 ms | 1395 KiB | 17 Q