3v4l.org

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

Function %00%7Bclosure%7D%2Fin%2F55kMR%3A7%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/55kMR
function name:  {closure}
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   'hi'
          1*     > RETURN                                                   null

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.04 ms | 1400 KiB | 15 Q