3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { protected $_b = 'protected'; private $_c = 'private'; } $method = function (){ var_dump($this);}; $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/vYbA0
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%2FvYbA0%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%2FvYbA0%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vYbA0
function name:  {closure}
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_THIS                                       ~0      
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
          4      > RETURN                                                   null

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

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.57 ms | 1395 KiB | 15 Q