3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Initial Configuration global $x; $i = 0; $tmp = ''; while($i < 10000) { $tmp .= 'a'; ++$i; } $x = array_fill(5, 1000, $tmp); unset($i, $tmp); // Test Source function Test3_1() { global $x; /* The Test */ $t = microtime(true); $size = count($x); for ($i=0; $i<$size; $i++); return (microtime(true) - $t); } // Variable Clean-up function Test3_End() { global $x; unset($x); } ?>
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/vVkjP
function name:  (null)
number of ops:  17
compiled vars:  !0 = $x, !1 = $i, !2 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_GLOBAL                                              !0, 'x'
    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                                                 5
         10        SEND_VAL                                                 1000
         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 test3_1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 9
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 12, Position 2 = 9
Branch analysis from position: 12
Branch analysis from position: 9
filename:       /in/vVkjP
function name:  Test3_1
number of ops:  18
compiled vars:  !0 = $x, !1 = $t, !2 = $size, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   BIND_GLOBAL                                              !0, 'x'
   19     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
   20     5        COUNT                                            ~6      !0
          6        ASSIGN                                                   !2, ~6
   21     7        ASSIGN                                                   !3, 0
          8      > JMP                                                      ->10
          9    >   PRE_INC                                                  !3
         10    >   IS_SMALLER                                               !3, !2
         11      > JMPNZ                                                    ~10, ->9
   23    12    >   INIT_FCALL                                               'microtime'
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $11     
         15        SUB                                              ~12     $11, !1
         16      > RETURN                                                   ~12
   24    17*     > RETURN                                                   null

End of function test3_1

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

End of function test3_end

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.14 ms | 1400 KiB | 17 Q