3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $_b = 'protected'; private $_c = 'private'; } $method = function (){ $x =& $this; $x = new stdClass; var_dump($this->_b, $this->_c);}; $a = new A; $method = $method->bindTo($a); $method();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8Ug6E
function name:  (null)
number of ops:  12
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%2F8Ug6E%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        DO_FCALL                                      0  $7      
          8        ASSIGN                                                   !0, $7
   11     9        INIT_DYNAMIC_CALL                                        !0
         10        DO_FCALL                                      0          
         11      > RETURN                                                   1

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

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

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.74 ms | 1395 KiB | 15 Q