3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $nums = \range(0, 25000); $starts = []; $ends = []; for ($i = 0; $i < 10; ++$i) { $starts[] = \microtime(true); $mout = \array_map(function ($item) { return (string)$item . 'm'; }, $nums); $ends[] = \microtime(true); } $total = 0; for ($i = 0; $i < 10; ++$i) { $total += $ends[$i] * 1000 - $starts[$i] * 1000; } \var_dump(\round($total / 10, 2));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 9
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 38
Branch analysis from position: 38
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 31
Branch analysis from position: 40
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 31
Branch analysis from position: 40
Branch analysis from position: 31
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 28, Position 2 = 9
Branch analysis from position: 28
Branch analysis from position: 9
filename:       /in/eEtFl
function name:  (null)
number of ops:  49
compiled vars:  !0 = $nums, !1 = $starts, !2 = $ends, !3 = $i, !4 = $mout, !5 = $total
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   INIT_FCALL                                               'range'
         1        SEND_VAL                                                 0
         2        SEND_VAL                                                 25000
         3        DO_ICALL                                         $6      
         4        ASSIGN                                                   !0, $6
   5     5        ASSIGN                                                   !1, <array>
   6     6        ASSIGN                                                   !2, <array>
   7     7        ASSIGN                                                   !3, 0
         8      > JMP                                                      ->26
   8     9    >   INIT_FCALL                                               'microtime'
        10        SEND_VAL                                                 <true>
        11        DO_ICALL                                         $12     
        12        ASSIGN_DIM                                               !1
        13        OP_DATA                                                  $12
   9    14        INIT_FCALL                                               'array_map'
        15        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FeEtFl0x7f48a429f0ce'
  11    16        SEND_VAL                                                 ~13
        17        SEND_VAR                                                 !0
        18        DO_ICALL                                         $14     
        19        ASSIGN                                                   !4, $14
  12    20        INIT_FCALL                                               'microtime'
        21        SEND_VAL                                                 <true>
        22        DO_ICALL                                         $17     
        23        ASSIGN_DIM                                               !2
        24        OP_DATA                                                  $17
   7    25        PRE_INC                                                  !3
        26    >   IS_SMALLER                                       ~19     !3, 10
        27      > JMPNZ                                                    ~19, ->9
  15    28    >   ASSIGN                                                   !5, 0
  16    29        ASSIGN                                                   !3, 0
        30      > JMP                                                      ->38
  17    31    >   FETCH_DIM_R                                      ~22     !2, !3
        32        MUL                                              ~23     ~22, 1000
        33        FETCH_DIM_R                                      ~24     !1, !3
        34        MUL                                              ~25     ~24, 1000
        35        SUB                                              ~26     ~23, ~25
        36        ASSIGN_ADD                                    0          !5, ~26
  16    37        PRE_INC                                                  !3
        38    >   IS_SMALLER                                       ~29     !3, 10
        39      > JMPNZ                                                    ~29, ->31
  19    40    >   INIT_FCALL                                               'var_dump'
        41        INIT_FCALL                                               'round'
        42        DIV                                              ~30     !5, 10
        43        SEND_VAL                                                 ~30
        44        SEND_VAL                                                 2
        45        DO_ICALL                                         $31     
        46        SEND_VAR                                                 $31
        47        DO_ICALL                                                 
        48      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FeEtFl0x7f48a429f0ce

Generated using Vulcan Logic Dumper, using php 7.3.0