3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a { static public function o() { return true;} } $cls = [ '' ]; foreach($cls as $cl) { echo var_export($cl, true); echo "\t"; echo "is_callable\n"; var_dump(is_callable($cl)); echo "is_callable by syntax\n"; var_dump(is_callable($cl,true)); echo "instance of closure\n"; var_dump($cl instanceof Closure); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 30
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 30
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/1R3XQ
function name:  (null)
number of ops:  32
compiled vars:  !0 = $cls, !1 = $cl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, <array>
   13     1      > FE_RESET_R                                       $3      !0, ->30
          2    > > FE_FETCH_R                                               $3, !1, ->30
   15     3    >   INIT_FCALL                                               'var_export'
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $4      
          7        ECHO                                                     $4
          8        ECHO                                                     '%09'
   17     9        ECHO                                                     'is_callable%0A'
   18    10        INIT_FCALL                                               'var_dump'
         11        INIT_FCALL                                               'is_callable'
         12        SEND_VAR                                                 !1
         13        DO_ICALL                                         $5      
         14        SEND_VAR                                                 $5
         15        DO_ICALL                                                 
   19    16        ECHO                                                     'is_callable+by+syntax%0A'
   20    17        INIT_FCALL                                               'var_dump'
         18        INIT_FCALL                                               'is_callable'
         19        SEND_VAR                                                 !1
         20        SEND_VAL                                                 <true>
         21        DO_ICALL                                         $7      
         22        SEND_VAR                                                 $7
         23        DO_ICALL                                                 
   21    24        ECHO                                                     'instance+of+closure%0A'
   22    25        INIT_FCALL                                               'var_dump'
         26        INSTANCEOF                                       ~9      !1, 'Closure'
         27        SEND_VAL                                                 ~9
         28        DO_ICALL                                                 
   13    29      > JMP                                                      ->2
         30    >   FE_FREE                                                  $3
   24    31      > RETURN                                                   1

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

End of function o

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.67 ms | 1396 KiB | 19 Q