3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $_b = 'protected'; private $_c = 'private'; } $method = function (){ var_dump($this->_b, $this->_c);}; $a = new A; $method = $method->bindTo($a, 'A'); $method();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VXu5Y
function name:  (null)
number of ops:  13
compiled vars:  !0 = $method, !1 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FVXu5Y%3A8%240'
          1        ASSIGN                                                   !0, ~2
    9     2        NEW                                              $4      'A'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
   10     5        INIT_METHOD_CALL                                         !0, 'bindTo'
          6        SEND_VAR_EX                                              !1
          7        SEND_VAL_EX                                              'A'
          8        DO_FCALL                                      0  $7      
          9        ASSIGN                                                   !0, $7
   11    10        INIT_DYNAMIC_CALL                                        !0
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FVXu5Y%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VXu5Y
function name:  {closure}
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       $0      
          2        FETCH_OBJ_R                                      ~1      $0, '_b'
          3        SEND_VAL                                                 ~1
          4        FETCH_THIS                                       $2      
          5        FETCH_OBJ_R                                      ~3      $2, '_c'
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
          8      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FVXu5Y%3A8%240

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.69 ms | 1395 KiB | 15 Q