3v4l.org

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

Function %00%7Bclosure%7D%2Fin%2FTNNjN%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TNNjN
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $kitchen
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        FETCH_OBJ_R                                      ~1      !0, 'yummy'
          2      > RETURN                                                   ~1
   10     3*     > RETURN                                                   null

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

Class Kitchen: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.1 ms | 1394 KiB | 13 Q