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_1() { global $aHash; /* The Test */ $t = microtime(true); reset($aHash); foreach($aHash as $val); 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/ajJO2
function name:  (null)
number of ops:  17
compiled vars:  !0 = $aHash, !1 = $i, !2 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   BIND_GLOBAL                                              !0, 'aHash'
    4     1        ASSIGN                                                   !1, 0
    5     2        ASSIGN                                                   !2, ''
    6     3      > JMP                                                      ->6
    7     4    >   ASSIGN_OP                                     8          !2, 'a'
    8     5        PRE_INC                                                  !1
    6     6    >   IS_SMALLER                                               !1, 10000
          7      > JMPNZ                                                    ~7, ->4
   10     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
   11    14        UNSET_CV                                                 !1
         15        UNSET_CV                                                 !2
   29    16      > RETURN                                                   1

Function test1_1:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 11
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 11
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
filename:       /in/ajJO2
function name:  Test1_1
number of ops:  18
compiled vars:  !0 = $aHash, !1 = $t, !2 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   BIND_GLOBAL                                              !0, 'aHash'
   18     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
   19     5        INIT_FCALL                                               'reset'
          6        SEND_REF                                                 !0
          7        DO_ICALL                                                 
   20     8      > FE_RESET_R                                       $6      !0, ->11
          9    > > FE_FETCH_R                                               $6, !2, ->11
         10    > > JMP                                                      ->9
         11    >   FE_FREE                                                  $6
   22    12        INIT_FCALL                                               'microtime'
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $7      
         15        SUB                                              ~8      $7, !1
         16      > RETURN                                                   ~8
   23    17*     > RETURN                                                   null

End of function test1_1

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

End of function test1_end

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.92 ms | 1400 KiB | 19 Q