3v4l.org

run code in 300+ PHP versions simultaneously
<?php $kitchen = new Kitchen(); // Closure::bind() actually creates a new instance of the closure $sweetsThief = Closure::bind($sweetsThief, null, $kitchen); var_dump($sweetsThief($kitchen));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/G1KFe
function name:  (null)
number of ops:  16
compiled vars:  !0 = $kitchen, !1 = $sweetsThief
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $2      'Kitchen'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    6     3        INIT_STATIC_METHOD_CALL                                  'Closure', 'bind'
          4        SEND_VAR                                                 !1
          5        SEND_VAL                                                 null
          6        SEND_VAR                                                 !0
          7        DO_FCALL                                      0  $5      
          8        ASSIGN                                                   !1, $5
    8     9        INIT_FCALL                                               'var_dump'
         10        INIT_DYNAMIC_CALL                                        !1
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0  $7      
         13        SEND_VAR                                                 $7
         14        DO_ICALL                                                 
         15      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.11 ms | 1394 KiB | 15 Q