3v4l.org

run code in 300+ PHP versions simultaneously
<?php function function_name(){} class C{ static function m(){} } $f = function(){}; var_dump(is_callable('function_name')); var_dump(is_callable(function(){})); var_dump(is_callable(array('C','m'))); var_dump(is_callable(array(new C(),'m'))); var_dump(is_callable($f));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qa146
function name:  (null)
number of ops:  38
compiled vars:  !0 = $f
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_LAMBDA_FUNCTION                          ~1      [0]
          1        ASSIGN                                                   !0, ~1
    8     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'is_callable'
          4        SEND_VAL                                                 'function_name'
          5        DO_ICALL                                         $3      
          6        SEND_VAR                                                 $3
          7        DO_ICALL                                                 
    9     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'is_callable'
         10        DECLARE_LAMBDA_FUNCTION                          ~5      [1]
         11        SEND_VAL                                                 ~5
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
   10    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'is_callable'
         17        SEND_VAL                                                 <array>
         18        DO_ICALL                                         $8      
         19        SEND_VAR                                                 $8
         20        DO_ICALL                                                 
   11    21        INIT_FCALL                                               'var_dump'
         22        INIT_FCALL                                               'is_callable'
         23        NEW                                              $10     'C'
         24        DO_FCALL                                      0          
         25        INIT_ARRAY                                       ~12     $10
         26        ADD_ARRAY_ELEMENT                                ~12     'm'
         27        SEND_VAL                                                 ~12
         28        DO_ICALL                                         $13     
         29        SEND_VAR                                                 $13
         30        DO_ICALL                                                 
   12    31        INIT_FCALL                                               'var_dump'
         32        INIT_FCALL                                               'is_callable'
         33        SEND_VAR                                                 !0
         34        DO_ICALL                                         $15     
         35        SEND_VAR                                                 $15
         36        DO_ICALL                                                 
         37      > RETURN                                                   1


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

End of Dynamic Function 0

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

End of Dynamic Function 1

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

End of function function_name

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

End of function m

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.63 ms | 1438 KiB | 15 Q