3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* How many times the code under test should run in each function */ define('LOOP',10000); function f1() { for($i=0; $i<LOOP; ++$i) { foreach (range(0, 100) as $i) { //echo $i . PHP_EOL; } } } $start = microtime(true); f1(); $stop = microtime(true); $time1 = $stop - $start;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mgQF0
function name:  (null)
number of ops:  17
compiled vars:  !0 = $start, !1 = $stop, !2 = $time1
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'define'
          1        SEND_VAL                                                 'LOOP'
          2        SEND_VAL                                                 10000
          3        DO_ICALL                                                 
   13     4        INIT_FCALL                                               'microtime'
          5        SEND_VAL                                                 <true>
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !0, $4
   14     8        INIT_FCALL                                               'f1'
          9        DO_FCALL                                      0          
   15    10        INIT_FCALL                                               'microtime'
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $7      
         13        ASSIGN                                                   !1, $7
   16    14        SUB                                              ~9      !1, !0
         15        ASSIGN                                                   !2, ~9
         16      > RETURN                                                   1

Function f1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 2
Branch analysis from position: 14
Branch analysis from position: 2
Branch analysis from position: 9
filename:       /in/mgQF0
function name:  f1
number of ops:  15
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->11
    7     2    >   INIT_FCALL                                               'range'
          3        SEND_VAL                                                 0
          4        SEND_VAL                                                 100
          5        DO_ICALL                                         $2      
          6      > FE_RESET_R                                       $3      $2, ->9
          7    > > FE_FETCH_R                                               $3, !0, ->9
          8    > > JMP                                                      ->7
          9    >   FE_FREE                                                  $3
    6    10        PRE_INC                                                  !0
         11    >   FETCH_CONSTANT                                   ~5      'LOOP'
         12        IS_SMALLER                                               !0, ~5
         13      > JMPNZ                                                    ~6, ->2
   11    14    > > RETURN                                                   null

End of function f1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.51 ms | 1403 KiB | 20 Q