3v4l.org

run code in 300+ PHP versions simultaneously
<?php $parameters = array(); $lines = range(1,10000); $start = microtime(true); while ($name = array_shift($lines)) { $parameters[$name] = array_shift($lines); } $end = microtime(true); //echo ($end-$start)." (while loop)\n"; $parameters2 = array(); $lines = range(1,10000); $start = microtime(true); $linescount = count($lines); for($i = 0; $i < $linescount; $i++){ $name = $lines[$i]; $i++; $parameters2[$name] = $lines[$i]; } $end = microtime(true); //echo ($end-$start)." (for loop)\n"; var_dump($parameters2);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 11
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 46
Branch analysis from position: 46
2 jumps found. (Code = 44) Position 1 = 48, Position 2 = 39
Branch analysis from position: 48
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
2 jumps found. (Code = 44) Position 1 = 48, Position 2 = 39
Branch analysis from position: 48
Branch analysis from position: 39
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 11
Branch analysis from position: 21
Branch analysis from position: 11
filename:       /in/8VT9V
function name:  (null)
number of ops:  56
compiled vars:  !0 = $parameters, !1 = $lines, !2 = $start, !3 = $name, !4 = $end, !5 = $parameters2, !6 = $linescount, !7 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'range'
          2        SEND_VAL                                                 1
          3        SEND_VAL                                                 10000
          4        DO_ICALL                                         $9      
          5        ASSIGN                                                   !1, $9
    5     6        INIT_FCALL                                               'microtime'
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $11     
          9        ASSIGN                                                   !2, $11
    6    10      > JMP                                                      ->16
    7    11    >   INIT_FCALL                                               'array_shift'
         12        SEND_REF                                                 !1
         13        DO_ICALL                                         $14     
         14        ASSIGN_DIM                                               !0, !3
         15        OP_DATA                                                  $14
    6    16    >   INIT_FCALL                                               'array_shift'
         17        SEND_REF                                                 !1
         18        DO_ICALL                                         $15     
         19        ASSIGN                                           ~16     !3, $15
         20      > JMPNZ                                                    ~16, ->11
    9    21    >   INIT_FCALL                                               'microtime'
         22        SEND_VAL                                                 <true>
         23        DO_ICALL                                         $17     
         24        ASSIGN                                                   !4, $17
   12    25        ASSIGN                                                   !5, <array>
   13    26        INIT_FCALL                                               'range'
         27        SEND_VAL                                                 1
         28        SEND_VAL                                                 10000
         29        DO_ICALL                                         $20     
         30        ASSIGN                                                   !1, $20
   14    31        INIT_FCALL                                               'microtime'
         32        SEND_VAL                                                 <true>
         33        DO_ICALL                                         $22     
         34        ASSIGN                                                   !2, $22
   15    35        COUNT                                            ~24     !1
         36        ASSIGN                                                   !6, ~24
   16    37        ASSIGN                                                   !7, 0
         38      > JMP                                                      ->46
   17    39    >   FETCH_DIM_R                                      ~27     !1, !7
         40        ASSIGN                                                   !3, ~27
   18    41        PRE_INC                                                  !7
   19    42        FETCH_DIM_R                                      ~31     !1, !7
         43        ASSIGN_DIM                                               !5, !3
         44        OP_DATA                                                  ~31
   16    45        PRE_INC                                                  !7
         46    >   IS_SMALLER                                               !7, !6
         47      > JMPNZ                                                    ~33, ->39
   21    48    >   INIT_FCALL                                               'microtime'
         49        SEND_VAL                                                 <true>
         50        DO_ICALL                                         $34     
         51        ASSIGN                                                   !4, $34
   23    52        INIT_FCALL                                               'var_dump'
         53        SEND_VAR                                                 !5
         54        DO_ICALL                                                 
         55      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.41 ms | 1392 KiB | 21 Q