3v4l.org

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

Function %00%7Bclosure%7D%2Fin%2FAl6fH%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Al6fH
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $kitchen
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        ASSIGN_OBJ                                               !0, 'yummy'
          2        OP_DATA                                                  'pasta'
   13     3      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FAl6fH%3A11%240

Class Kitchen: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.11 ms | 1395 KiB | 15 Q