3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Kitchen { private $value = 'cheese'; } $k = new Kitchen(); $m = function(){ var_dump(self); }; Closure::bind($m, $k, $k); $m();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7NFaB
function name:  (null)
number of ops:  13
compiled vars:  !0 = $k, !1 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'Kitchen'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   12     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F7NFaB%3A12%240'
          4        ASSIGN                                                   !1, ~5
   16     5        INIT_STATIC_METHOD_CALL                                  'Closure', 'bind'
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !0
          8        SEND_VAR                                                 !0
          9        DO_FCALL                                      0          
   18    10        INIT_DYNAMIC_CALL                                        !1
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F7NFaB%3A12%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7NFaB
function name:  {closure}
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'var_dump'
          1        FETCH_CONSTANT                                   ~0      'self'
          2        SEND_VAL                                                 ~0
          3        DO_ICALL                                                 
   14     4      > RETURN                                                   null

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

Class Kitchen: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.62 ms | 1395 KiB | 15 Q