3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { static function b() { return 'soy b static'; } function a() { return 'soy a'; } } $z=(new a)->a(); var_dump(is_callable($z)); die; $a=call_user_func(['a', 'b']); $b=call_user_func_array(['a', 'b'],[]); $c=call_user_func('a' .'::b');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/7smGQ
function name:  (null)
number of ops:  24
compiled vars:  !0 = $z, !1 = $a, !2 = $b, !3 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   NEW                                              $4      'a'
          1        DO_FCALL                                      0          
          2        INIT_METHOD_CALL                                         $4, 'a'
          3        DO_FCALL                                      0  $6      
          4        ASSIGN                                                   !0, $6
   21     5        INIT_FCALL                                               'var_dump'
          6        INIT_FCALL                                               'is_callable'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $8      
          9        SEND_VAR                                                 $8
         10        DO_ICALL                                                 
   25    11      > EXIT                                                     
   29    12*       INIT_USER_CALL                                0          'call_user_func', <array>
         13*       DO_FCALL                                      0  $10     
         14*       ASSIGN                                                   !1, $10
   30    15*       INIT_USER_CALL                                0          'call_user_func_array', <array>
         16*       SEND_ARRAY                                               <array>
         17*       CHECK_UNDEF_ARGS                                         
         18*       DO_FCALL                                      0  $12     
         19*       ASSIGN                                                   !2, $12
   31    20*       INIT_USER_CALL                                0          'call_user_func', 'a%3A%3Ab'
         21*       DO_FCALL                                      0  $14     
         22*       ASSIGN                                                   !3, $14
         23*     > RETURN                                                   1

Class A:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7smGQ
function name:  b
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E > > RETURN                                                   'soy+b+static'
    7     1*     > RETURN                                                   null

End of function b

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

End of function a

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.94 ms | 1388 KiB | 17 Q