3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected function _a() { return 'waa?'; } } class B extends A{} $c = function() { return $this->_a(); }; $b = new B; $c = $c->bindTo($b); var_dump($c); $c();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qSfET
function name:  (null)
number of ops:  15
compiled vars:  !0 = $c, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FqSfET%3A12%240'
          1        ASSIGN                                                   !0, ~2
   13     2        NEW                                              $4      'B'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
   15     5        INIT_METHOD_CALL                                         !0, 'bindTo'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !0, $7
   16     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                                 
   17    12        INIT_DYNAMIC_CALL                                        !0
         13        DO_FCALL                                      0          
         14      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FqSfET%3A12%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qSfET
function name:  {closure}
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   FETCH_THIS                                       $0      
          1        INIT_METHOD_CALL                                         $0, '_a'
          2        DO_FCALL                                      0  $1      
          3      > RETURN                                                   $1
          4*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FqSfET%3A12%240

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

End of function _a

End of class A.

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

End of function _a

End of class B.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.58 ms | 1396 KiB | 15 Q