3v4l.org

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

Function %00%7Bclosure%7D%2Fin%2Ft5VS8%3A3%240:
Finding entry points
Branch analysis from position: 0
Return found
filename:       /in/t5VS8
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $kitchen
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        FETCH_OBJ_W                                      $1      !0, 'yummy'
          2      > RETURN_BY_REF                                            $1
    5     3*     > RETURN_BY_REF                                            null

End of function %00%7Bclosure%7D%2Fin%2Ft5VS8%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.77 ms | 1400 KiB | 15 Q