3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array(); for($i=0;$i<1000;$i++) { $data[$i] = 'data-'.$i; } $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $start = $time; $test = 0; $count = count($data); for($i=0;$i<$count;$i++) { $test = 'data-'.$i; } $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $finish = $time; $total_time = round(($finish - $start), 4); echo 'Page generated in '.$total_time.' seconds.'."\n"; $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $start = $time; $test = 0; for($i=0;$i<count($data);$i++) { $test = 'data-'.$i; } $time = microtime(); $time = explode(' ', $time); $time = $time[1] + $time[0]; $finish = $time; $total_time = round(($finish - $start), 4); echo 'Page generated in '.$total_time.' seconds.'."\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 27
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 74
Branch analysis from position: 74
2 jumps found. (Code = 44) Position 1 = 77, Position 2 = 71
Branch analysis from position: 77
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 71
2 jumps found. (Code = 44) Position 1 = 77, Position 2 = 71
Branch analysis from position: 77
Branch analysis from position: 71
Branch analysis from position: 27
2 jumps found. (Code = 44) Position 1 = 32, Position 2 = 27
Branch analysis from position: 32
Branch analysis from position: 27
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 3
Branch analysis from position: 9
Branch analysis from position: 3
filename:       /in/SaJoO
function name:  (null)
number of ops:  101
compiled vars:  !0 = $data, !1 = $i, !2 = $time, !3 = $start, !4 = $test, !5 = $count, !6 = $finish, !7 = $total_time
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        ASSIGN                                                   !1, 0
          2      > JMP                                                      ->7
    5     3    >   CONCAT                                           ~11     'data-', !1
          4        ASSIGN_DIM                                               !0, !1
          5        OP_DATA                                                  ~11
    4     6        PRE_INC                                                  !1
          7    >   IS_SMALLER                                               !1, 1000
          8      > JMPNZ                                                    ~13, ->3
    9     9    >   INIT_FCALL                                               'microtime'
         10        DO_ICALL                                         $14     
         11        ASSIGN                                                   !2, $14
   10    12        INIT_FCALL                                               'explode'
         13        SEND_VAL                                                 '+'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                         $16     
         16        ASSIGN                                                   !2, $16
   11    17        FETCH_DIM_R                                      ~18     !2, 1
         18        FETCH_DIM_R                                      ~19     !2, 0
         19        ADD                                              ~20     ~18, ~19
         20        ASSIGN                                                   !2, ~20
   12    21        ASSIGN                                                   !3, !2
   14    22        ASSIGN                                                   !4, 0
   15    23        COUNT                                            ~24     !0
         24        ASSIGN                                                   !5, ~24
   16    25        ASSIGN                                                   !1, 0
         26      > JMP                                                      ->30
   17    27    >   CONCAT                                           ~27     'data-', !1
         28        ASSIGN                                                   !4, ~27
   16    29        PRE_INC                                                  !1
         30    >   IS_SMALLER                                               !1, !5
         31      > JMPNZ                                                    ~30, ->27
   21    32    >   INIT_FCALL                                               'microtime'
         33        DO_ICALL                                         $31     
         34        ASSIGN                                                   !2, $31
   22    35        INIT_FCALL                                               'explode'
         36        SEND_VAL                                                 '+'
         37        SEND_VAR                                                 !2
         38        DO_ICALL                                         $33     
         39        ASSIGN                                                   !2, $33
   23    40        FETCH_DIM_R                                      ~35     !2, 1
         41        FETCH_DIM_R                                      ~36     !2, 0
         42        ADD                                              ~37     ~35, ~36
         43        ASSIGN                                                   !2, ~37
   24    44        ASSIGN                                                   !6, !2
   25    45        INIT_FCALL                                               'round'
         46        SUB                                              ~40     !6, !3
         47        SEND_VAL                                                 ~40
         48        SEND_VAL                                                 4
         49        DO_ICALL                                         $41     
         50        ASSIGN                                                   !7, $41
   26    51        CONCAT                                           ~43     'Page+generated+in+', !7
         52        CONCAT                                           ~44     ~43, '+seconds.'
         53        CONCAT                                           ~45     ~44, '%0A'
         54        ECHO                                                     ~45
   30    55        INIT_FCALL                                               'microtime'
         56        DO_ICALL                                         $46     
         57        ASSIGN                                                   !2, $46
   31    58        INIT_FCALL                                               'explode'
         59        SEND_VAL                                                 '+'
         60        SEND_VAR                                                 !2
         61        DO_ICALL                                         $48     
         62        ASSIGN                                                   !2, $48
   32    63        FETCH_DIM_R                                      ~50     !2, 1
         64        FETCH_DIM_R                                      ~51     !2, 0
         65        ADD                                              ~52     ~50, ~51
         66        ASSIGN                                                   !2, ~52
   33    67        ASSIGN                                                   !3, !2
   35    68        ASSIGN                                                   !4, 0
   36    69        ASSIGN                                                   !1, 0
         70      > JMP                                                      ->74
   37    71    >   CONCAT                                           ~57     'data-', !1
         72        ASSIGN                                                   !4, ~57
   36    73        PRE_INC                                                  !1
         74    >   COUNT                                            ~60     !0
         75        IS_SMALLER                                               !1, ~60
         76      > JMPNZ                                                    ~61, ->71
   40    77    >   INIT_FCALL                                               'microtime'
         78        DO_ICALL                                         $62     
         79        ASSIGN                                                   !2, $62
   41    80        INIT_FCALL                                               'explode'
         81        SEND_VAL                                                 '+'
         82        SEND_VAR                                                 !2
         83        DO_ICALL                                         $64     
         84        ASSIGN                                                   !2, $64
   42    85        FETCH_DIM_R                                      ~66     !2, 1
         86        FETCH_DIM_R                                      ~67     !2, 0
         87        ADD                                              ~68     ~66, ~67
         88        ASSIGN                                                   !2, ~68
   43    89        ASSIGN                                                   !6, !2
   44    90        INIT_FCALL                                               'round'
         91        SUB                                              ~71     !6, !3
         92        SEND_VAL                                                 ~71
         93        SEND_VAL                                                 4
         94        DO_ICALL                                         $72     
         95        ASSIGN                                                   !7, $72
   45    96        CONCAT                                           ~74     'Page+generated+in+', !7
         97        CONCAT                                           ~75     ~74, '+seconds.'
         98        CONCAT                                           ~76     ~75, '%0A'
         99        ECHO                                                     ~76
        100      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.56 ms | 1404 KiB | 19 Q