3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A{ public function __construct() { var_dump(is_callable(array($this, 'bar'))); } } class B{ public function bar() { return 'bar'; } } $x = new A();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PfhG0
function name:  (null)
number of ops:  4
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $1      'A'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
          3      > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PfhG0
function name:  __construct
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'is_callable'
          2        FETCH_THIS                                       ~0      
          3        INIT_ARRAY                                       ~1      ~0
          4        ADD_ARRAY_ELEMENT                                ~1      'bar'
          5        SEND_VAL                                                 ~1
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                                 
    8     9      > RETURN                                                   null

End of function __construct

End of class A.

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

End of function bar

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.15 ms | 940 KiB | 18 Q