3v4l.org

run code in 300+ PHP versions simultaneously
<?php class a{ public function b(){ echo 'toto'; } } $a = new a(); $method = 'b'; var_dump(is_callable(array($a,$method))); $a->$method();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LPnYB
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   10     3        ASSIGN                                                   !1, 'b'
   12     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'is_callable'
          6        INIT_ARRAY                                       ~6      !0
          7        ADD_ARRAY_ELEMENT                                ~6      !1
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                         $7      
         10        SEND_VAR                                                 $7
         11        DO_ICALL                                                 
   14    12        INIT_METHOD_CALL                                         !0, !1
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

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

End of function b

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.7 ms | 1395 KiB | 17 Q