3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $callback = function() { echo $this->a; }; class A { private $a = 5; } $callback->bindTo(new A(), A::class);
based on rH5oa
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Wk4aG
function name:  (null)
number of ops:  10
compiled vars:  !0 = $callback
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FWk4aG0x7fcd23730033'
   6     1        ASSIGN                                                   !0, ~1
   8     2        NOP                                                      
  13     3        INIT_METHOD_CALL                                         !0, 'bindTo'
         4        NEW                                              $4      :-3
         5        DO_FCALL                                      0          
         6        SEND_VAR_NO_REF                               0          $4
         7        SEND_VAL_EX                                              'A'
         8        DO_FCALL                                      0          
         9      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FWk4aG0x7fcd23730033:
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = -2
filename:       /in/Wk4aG
function name:  {closure}
number of ops:  3
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   5     0  E >   FETCH_OBJ_R                                      $0      'a'
         1        ECHO                                                     $0
   6     2      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FWk4aG0x7fcd23730033

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 7.3.0