3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = 0; $i < 100000; $i += 1) { $sweetsThief = Closure::bind(function (Kitchen $kitchen) { return $kitchen->yummy; }, null, 'Kitchen'); } for ($i = 0; $i < 100000; $i += 1) { $sweetsThief = new ReflectionProperty('Kitchen', 'yummy'); $sweetsThief->setAccessible(true); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 14
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 25, Position 2 = 14
Branch analysis from position: 25
Branch analysis from position: 14
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 2
Branch analysis from position: 12
Branch analysis from position: 2
filename:       /in/NJjUF
function name:  (null)
number of ops:  26
compiled vars:  !0 = $i, !1 = $sweetsThief
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->10
    4     2    >   INIT_STATIC_METHOD_CALL                                  'Closure', 'bind'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FNJjUF%3A4%240'
    6     4        SEND_VAL                                                 ~3
          5        SEND_VAL                                                 null
          6        SEND_VAL                                                 'Kitchen'
          7        DO_FCALL                                      0  $4      
    4     8        ASSIGN                                                   !1, $4
    3     9        ASSIGN_OP                                     1          !0, 1
         10    >   IS_SMALLER                                               !0, 100000
         11      > JMPNZ                                                    ~7, ->2
   10    12    >   ASSIGN                                                   !0, 0
         13      > JMP                                                      ->23
   11    14    >   NEW                                              $9      'ReflectionProperty'
         15        SEND_VAL_EX                                              'Kitchen'
         16        SEND_VAL_EX                                              'yummy'
         17        DO_FCALL                                      0          
         18        ASSIGN                                                   !1, $9
   12    19        INIT_METHOD_CALL                                         !1, 'setAccessible'
         20        SEND_VAL_EX                                              <true>
         21        DO_FCALL                                      0          
   10    22        ASSIGN_OP                                     1          !0, 1
         23    >   IS_SMALLER                                               !0, 100000
         24      > JMPNZ                                                    ~14, ->14
   13    25    > > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FNJjUF%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.67 ms | 1395 KiB | 13 Q