3v4l.org

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

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

End of function %00%7Bclosure%7D%2Fin%2FOcMsv%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.17 ms | 1396 KiB | 15 Q