3v4l.org

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

Function %00%7Bclosure%7D%2Fin%2FFMaWS%3A11%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FMaWS
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        FETCH_OBJ_R                                      ~1      !0, 'yummy'
          2      > RETURN                                                   ~1
   13     3*     > RETURN                                                   null

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

Class Kitchen: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.02 ms | 1395 KiB | 13 Q