3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Initial Configuration global $aHash; $i = 0; $tmp = ''; while($i < 10000) { $tmp .= 'a'; ++$i; } $aHash = array_fill(100000000000000000000000, 100, $tmp); unset($i, $tmp); // Test Source function Test1_9() { global $aHash; /* The Test */ $t = microtime(true); reset($aHash); $key = array_keys($aHash); $size = sizeOf($key); for ($i=0; $i<$size; $i++) $tmp[] = $aHash[$key[$i]]; return (microtime(true) - $t); } // Variable Clean-up function Test1_End() { global $aHash; unset($aHash); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 4
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 8, Position 2 = 4
Branch analysis from position: 8
Branch analysis from position: 4
filename:       /in/EZuao
function name:  (null)
number of ops:  17
compiled vars:  !0 = $aHash, !1 = $i, !2 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_GLOBAL                                              !0, 'aHash'
    5     1        ASSIGN                                                   !1, 0
    6     2        ASSIGN                                                   !2, ''
    7     3      > JMP                                                      ->6
    8     4    >   ASSIGN_OP                                     8          !2, 'a'
    9     5        PRE_INC                                                  !1
    7     6    >   IS_SMALLER                                               !1, 10000
          7      > JMPNZ                                                    ~7, ->4
   11     8    >   INIT_FCALL                                               'array_fill'
          9        SEND_VAL                                                 1.0e+23
         10        SEND_VAL                                                 100
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $8      
         13        ASSIGN                                                   !0, $8
   12    14        UNSET_CV                                                 !1
         15        UNSET_CV                                                 !2
   32    16      > RETURN                                                   1

Function test1_9:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 16
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 23, Position 2 = 16
Branch analysis from position: 23
Branch analysis from position: 16
filename:       /in/EZuao
function name:  Test1_9
number of ops:  29
compiled vars:  !0 = $aHash, !1 = $t, !2 = $key, !3 = $size, !4 = $i, !5 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   BIND_GLOBAL                                              !0, 'aHash'
   19     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
   20     5        INIT_FCALL                                               'reset'
          6        SEND_REF                                                 !0
          7        DO_ICALL                                                 
   21     8        INIT_FCALL                                               'array_keys'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $9      
         11        ASSIGN                                                   !2, $9
   22    12        COUNT                                            ~11     !2
         13        ASSIGN                                                   !3, ~11
   23    14        ASSIGN                                                   !4, 0
         15      > JMP                                                      ->21
         16    >   FETCH_DIM_R                                      ~15     !2, !4
         17        FETCH_DIM_R                                      ~16     !0, ~15
         18        ASSIGN_DIM                                               !5
         19        OP_DATA                                                  ~16
         20        PRE_INC                                                  !4
         21    >   IS_SMALLER                                               !4, !3
         22      > JMPNZ                                                    ~18, ->16
   25    23    >   INIT_FCALL                                               'microtime'
         24        SEND_VAL                                                 <true>
         25        DO_ICALL                                         $19     
         26        SUB                                              ~20     $19, !1
         27      > RETURN                                                   ~20
   26    28*     > RETURN                                                   null

End of function test1_9

Function test1_end:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EZuao
function name:  Test1_End
number of ops:  3
compiled vars:  !0 = $aHash
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   30     0  E >   BIND_GLOBAL                                              !0, 'aHash'
   31     1        UNSET_CV                                                 !0
   32     2      > RETURN                                                   null

End of function test1_end

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.49 ms | 1400 KiB | 21 Q