3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo{ public static function Bar(){ echo 'Bar'; } } function sillyboy(){ echo 'sillyboy'; } $f = 'Foo::Bar'; $f2 = 'sillyboy'; if (is_callable($f)){ call_user_func($f); } if (is_callable($f2)){ call_user_func($f2); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
Branch analysis from position: 8
filename:       /in/Rg47S
function name:  (null)
number of ops:  15
compiled vars:  !0 = $f, !1 = $f2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   ASSIGN                                                   !0, 'Foo%3A%3ABar'
   14     1        ASSIGN                                                   !1, 'sillyboy'
   16     2        INIT_FCALL                                               'is_callable'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5      > JMPZ                                                     $4, ->8
   17     6    >   INIT_USER_CALL                                0          'call_user_func', !0
          7        DO_FCALL                                      0          
   20     8    >   INIT_FCALL                                               'is_callable'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $6      
         11      > JMPZ                                                     $6, ->14
   21    12    >   INIT_USER_CALL                                0          'call_user_func', !1
         13        DO_FCALL                                      0          
   22    14    > > RETURN                                                   1

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

End of function sillyboy

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

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.25 ms | 1396 KiB | 15 Q