3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(time()); $array = array(); $i = 0; while(++$i < 1000){ $array['good'] = 2; } var_dump(time()); /*var_dump(time());   $array = array();    $i = 0;    for($i=0;$i<10000;$i++){        $array['key'] = 2;    } var_dump(time()); /* _dump(time()); $array = array(); $i = 0; for($i=0;$i<10000;$i++){ $array[key] = 2; } var_dump(time()); */ ?>
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 = 13, Position 2 = 8
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 8
Branch analysis from position: 13
Branch analysis from position: 8
filename:       /in/W0i1Y
function name:  (null)
number of ops:  19
compiled vars:  !0 = $array, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'time'
          2        DO_ICALL                                         $2      
          3        SEND_VAR                                                 $2
          4        DO_ICALL                                                 
    4     5        ASSIGN                                                   !0, <array>
    5     6        ASSIGN                                                   !1, 0
    6     7      > JMP                                                      ->10
    7     8    >   ASSIGN_DIM                                               !0, 'good'
          9        OP_DATA                                                  2
    6    10    >   PRE_INC                                          ~7      !1
         11        IS_SMALLER                                               ~7, 1000
         12      > JMPNZ                                                    ~8, ->8
    9    13    >   INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'time'
         15        DO_ICALL                                         $9      
         16        SEND_VAR                                                 $9
         17        DO_ICALL                                                 
   30    18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.53 ms | 1399 KiB | 17 Q