3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = range(0, 100000); $keys = array_map(function ($x) { return chr(46+rand(0, 26)) . chr(46+rand(0, 26)) . chr(46+rand(0, 26)) . $x; }, $x); $vars = array_combine($keys, $x); $time = 0.0; for ($i = $runs = 1000; $i-- > 0;) { $t = microtime(TRUE); extract($vars); $time += microtime(TRUE) - $t; } echo sprintf("%.4f", $time / $runs);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 20
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 35, Position 2 = 20
Branch analysis from position: 35
Branch analysis from position: 20
filename:       /in/6dof3
function name:  (null)
number of ops:  42
compiled vars:  !0 = $x, !1 = $keys, !2 = $vars, !3 = $time, !4 = $i, !5 = $runs, !6 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 100000
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !0, $7
    3     5        INIT_FCALL                                               'array_map'
          6        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F6dof3%3A3%240'
    5     7        SEND_VAL                                                 ~9
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $10     
    3    10        ASSIGN                                                   !1, $10
    6    11        INIT_FCALL                                               'array_combine'
         12        SEND_VAR                                                 !1
         13        SEND_VAR                                                 !0
         14        DO_ICALL                                         $12     
         15        ASSIGN                                                   !2, $12
    7    16        ASSIGN                                                   !3, 0
    8    17        ASSIGN                                           ~15     !5, 1000
         18        ASSIGN                                                   !4, ~15
         19      > JMP                                                      ->32
    9    20    >   INIT_FCALL                                               'microtime'
         21        SEND_VAL                                                 <true>
         22        DO_ICALL                                         $17     
         23        ASSIGN                                                   !6, $17
   10    24        INIT_FCALL                                               'extract'
         25        SEND_REF                                                 !2
         26        DO_ICALL                                                 
   11    27        INIT_FCALL                                               'microtime'
         28        SEND_VAL                                                 <true>
         29        DO_ICALL                                         $20     
         30        SUB                                              ~21     $20, !6
         31        ASSIGN_OP                                     1          !3, ~21
    8    32    >   POST_DEC                                         ~23     !4
         33        IS_SMALLER                                               0, ~23
         34      > JMPNZ                                                    ~24, ->20
   13    35    >   INIT_FCALL                                               'sprintf'
         36        SEND_VAL                                                 '%25.4f'
         37        DIV                                              ~25     !3, !5
         38        SEND_VAL                                                 ~25
         39        DO_ICALL                                         $26     
         40        ECHO                                                     $26
         41      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F6dof3%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6dof3
function name:  {closure}
number of ops:  30
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'chr'
          2        INIT_FCALL                                               'rand'
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 26
          5        DO_ICALL                                         $1      
          6        ADD                                              ~2      46, $1
          7        SEND_VAL                                                 ~2
          8        DO_ICALL                                         $3      
          9        INIT_FCALL                                               'chr'
         10        INIT_FCALL                                               'rand'
         11        SEND_VAL                                                 0
         12        SEND_VAL                                                 26
         13        DO_ICALL                                         $4      
         14        ADD                                              ~5      46, $4
         15        SEND_VAL                                                 ~5
         16        DO_ICALL                                         $6      
         17        CONCAT                                           ~7      $3, $6
         18        INIT_FCALL                                               'chr'
         19        INIT_FCALL                                               'rand'
         20        SEND_VAL                                                 0
         21        SEND_VAL                                                 26
         22        DO_ICALL                                         $8      
         23        ADD                                              ~9      46, $8
         24        SEND_VAL                                                 ~9
         25        DO_ICALL                                         $10     
         26        CONCAT                                           ~11     ~7, $10
         27        CONCAT                                           ~12     ~11, !0
         28      > RETURN                                                   ~12
    5    29*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F6dof3%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.34 ms | 1400 KiB | 29 Q