3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo{ public static function Bar($num){ $num*=50; } } function sillyboy(){ echo 'sillyboy'; } function inc(&$p1){ $p1++; } $f = 'Foo::Bar'; $f2 = 'sillyboy'; if (is_callable($f)){ call_user_func($f); } if (is_callable($f2)){ call_user_func($f2); } $num = 3; call_user_func_array('Foo::Bar', array(&$num)); echo $num;
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/TkCVL
function name:  (null)
number of ops:  22
compiled vars:  !0 = $f, !1 = $f2, !2 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   ASSIGN                                                   !0, 'Foo%3A%3ABar'
   20     1        ASSIGN                                                   !1, 'sillyboy'
   22     2        INIT_FCALL                                               'is_callable'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5      > JMPZ                                                     $5, ->8
   23     6    >   INIT_USER_CALL                                0          'call_user_func', !0
          7        DO_FCALL                                      0          
   26     8    >   INIT_FCALL                                               'is_callable'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $7      
         11      > JMPZ                                                     $7, ->14
   27    12    >   INIT_USER_CALL                                0          'call_user_func', !1
         13        DO_FCALL                                      0          
   30    14    >   ASSIGN                                                   !2, 3
   31    15        INIT_USER_CALL                                0          'call_user_func_array', 'Foo%3A%3ABar'
         16        INIT_ARRAY                                       ~10     !2
         17        SEND_ARRAY                                               ~10
         18        CHECK_UNDEF_ARGS                                         
         19        DO_FCALL                                      0          
   32    20        ECHO                                                     !2
         21      > RETURN                                                   1

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

End of function sillyboy

Function inc:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TkCVL
function name:  inc
number of ops:  3
compiled vars:  !0 = $p1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   15     1        PRE_INC                                                  !0
   16     2      > RETURN                                                   null

End of function inc

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TkCVL
function name:  Bar
number of ops:  3
compiled vars:  !0 = $num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        ASSIGN_OP                                     3          !0, 50
          2      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.7 ms | 1392 KiB | 15 Q