3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $count = 20000; $time = microtime(true); $items = array(); for ($i = 0; $i < $count; $i++) { $item = array(); $item['some_simple_key_0'] = 'value 0'; $item['some_simple_key_1'] = 'value 1'; $item['some_simple_key_2'] = 'value 2'; $item['some_simple_key_3'] = 'value 3'; $item['some_simple_key_4'] = 'value 4'; $item['some_simple_key_5'] = 'value 5'; $item['some_simple_key_6'] = 'value 6'; $item['some_simple_key_7'] = 'value 7'; $item['some_simple_key_8'] = 'value 8'; $item['some_simple_key_9'] = 'value 9'; $val = $item['some_simple_key_0']; $val = $item['some_simple_key_1']; $val = $item['some_simple_key_2']; $val = $item['some_simple_key_3']; $val = $item['some_simple_key_4']; $val = $item['some_simple_key_5']; $val = $item['some_simple_key_6']; $val = $item['some_simple_key_7']; $val = $item['some_simple_key_8']; $val = $item['some_simple_key_9']; $items[] = $item; } $spentTime = microtime(true) - $time; echo number_format($spentTime, 3) . ' seconds';
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 53
Branch analysis from position: 53
Jump found. Position 1 = 55, Position 2 = 8
Branch analysis from position: 55
Jump found. Position 1 = -2
Branch analysis from position: 8
Jump found. Position 1 = 55, Position 2 = 8
Branch analysis from position: 55
Branch analysis from position: 8
filename:       /in/oaPf0
function name:  (null)
number of ops:  67
compiled vars:  !0 = $count, !1 = $time, !2 = $items, !3 = $i, !4 = $item, !5 = $val, !6 = $spentTime
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   3     0  E >   ASSIGN                                                   !0, 20000
   5     1        INIT_FCALL                                               'microtime'
         2        SEND_VAL                                                 <true>
         3        DO_ICALL                                         $8      
         4        ASSIGN                                                   !1, $8
   6     5        ASSIGN                                                   !2, <array>
   8     6        ASSIGN                                                   !3, 0
         7      > JMP                                                      ->53
   9     8    >   ASSIGN                                                   !4, <array>
  11     9        ASSIGN_DIM                                               !4, 'some_simple_key_0'
        10        OP_DATA                                                  'value+0'
  12    11        ASSIGN_DIM                                               !4, 'some_simple_key_1'
        12        OP_DATA                                                  'value+1'
  13    13        ASSIGN_DIM                                               !4, 'some_simple_key_2'
        14        OP_DATA                                                  'value+2'
  14    15        ASSIGN_DIM                                               !4, 'some_simple_key_3'
        16        OP_DATA                                                  'value+3'
  15    17        ASSIGN_DIM                                               !4, 'some_simple_key_4'
        18        OP_DATA                                                  'value+4'
  16    19        ASSIGN_DIM                                               !4, 'some_simple_key_5'
        20        OP_DATA                                                  'value+5'
  17    21        ASSIGN_DIM                                               !4, 'some_simple_key_6'
        22        OP_DATA                                                  'value+6'
  18    23        ASSIGN_DIM                                               !4, 'some_simple_key_7'
        24        OP_DATA                                                  'value+7'
  19    25        ASSIGN_DIM                                               !4, 'some_simple_key_8'
        26        OP_DATA                                                  'value+8'
  20    27        ASSIGN_DIM                                               !4, 'some_simple_key_9'
        28        OP_DATA                                                  'value+9'
  22    29        FETCH_DIM_R                                      $23     !4, 'some_simple_key_0'
        30        ASSIGN                                                   !5, $23
  23    31        FETCH_DIM_R                                      $25     !4, 'some_simple_key_1'
        32        ASSIGN                                                   !5, $25
  24    33        FETCH_DIM_R                                      $27     !4, 'some_simple_key_2'
        34        ASSIGN                                                   !5, $27
  25    35        FETCH_DIM_R                                      $29     !4, 'some_simple_key_3'
        36        ASSIGN                                                   !5, $29
  26    37        FETCH_DIM_R                                      $31     !4, 'some_simple_key_4'
        38        ASSIGN                                                   !5, $31
  27    39        FETCH_DIM_R                                      $33     !4, 'some_simple_key_5'
        40        ASSIGN                                                   !5, $33
  28    41        FETCH_DIM_R                                      $35     !4, 'some_simple_key_6'
        42        ASSIGN                                                   !5, $35
  29    43        FETCH_DIM_R                                      $37     !4, 'some_simple_key_7'
        44        ASSIGN                                                   !5, $37
  30    45        FETCH_DIM_R                                      $39     !4, 'some_simple_key_8'
        46        ASSIGN                                                   !5, $39
  31    47        FETCH_DIM_R                                      $41     !4, 'some_simple_key_9'
        48        ASSIGN                                                   !5, $41
  33    49        ASSIGN_DIM                                               !2
        50        OP_DATA                                                  !4
   8    51        POST_INC                                         ~44     !3
        52        FREE                                                     ~44
        53    >   IS_SMALLER                                       ~45     !3, !0
        54      > JMPNZ                                                    ~45, ->8
  36    55    >   INIT_FCALL                                               'microtime'
        56        SEND_VAL                                                 <true>
        57        DO_ICALL                                         $46     
        58        SUB                                              ~47     $46, !1
        59        ASSIGN                                                   !6, ~47
  38    60        INIT_FCALL                                               'number_format'
        61        SEND_VAR                                                 !6
        62        SEND_VAL                                                 3
        63        DO_ICALL                                         $49     
        64        CONCAT                                           ~50     $49, '+seconds'
        65        ECHO                                                     ~50
        66      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.2.0