3v4l.org

run code in 300+ PHP versions simultaneously
<?php for($i=0; $i < 1000; $i++) { usleep(rand(0, 100)); $arr[] = microtime(); } //var_dump($arr); echo "------------------------------------------------------------------------------------------------\r"; foreach($arr as $val) { list($msec) = explode(' ', $val); if($prev) { if($msec == $prev) $eq++; elseif($prev + 0.001 == $msec) $plus_one++; else { $not_plus_one++; /* var_dump('not +0.001'); var_dump($prev); var_dump($msec); die(); */ } } $prev = $msec; } var_dump($eq); var_dump($plus_one); var_dump($not_plus_one);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 2
Branch analysis from position: 16
2 jumps found. (Code = 77) Position 1 = 18, Position 2 = 39
Branch analysis from position: 18
2 jumps found. (Code = 78) Position 1 = 19, Position 2 = 39
Branch analysis from position: 19
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 37
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 31
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 31
2 jumps found. (Code = 43) Position 1 = 34, Position 2 = 36
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
Branch analysis from position: 36
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
Branch analysis from position: 37
Branch analysis from position: 39
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 39
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 2
Branch analysis from position: 16
Branch analysis from position: 2
filename:       /in/9Vm8Z
function name:  (null)
number of ops:  50
compiled vars:  !0 = $i, !1 = $arr, !2 = $val, !3 = $msec, !4 = $prev, !5 = $eq, !6 = $plus_one, !7 = $not_plus_one
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 0
          1      > JMP                                                      ->14
    3     2    >   INIT_FCALL                                               'usleep'
          3        INIT_FCALL                                               'rand'
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 100
          6        DO_ICALL                                         $9      
          7        SEND_VAR                                                 $9
          8        DO_ICALL                                                 
    4     9        INIT_FCALL                                               'microtime'
         10        DO_ICALL                                         $12     
         11        ASSIGN_DIM                                               !1
         12        OP_DATA                                                  $12
    2    13        PRE_INC                                                  !0
         14    >   IS_SMALLER                                               !0, 1000
         15      > JMPNZ                                                    ~14, ->2
    8    16    >   ECHO                                                     '------------------------------------------------------------------------------------------------%0D'
   10    17      > FE_RESET_R                                       $15     !1, ->39
         18    > > FE_FETCH_R                                               $15, !2, ->39
   11    19    >   INIT_FCALL                                               'explode'
         20        SEND_VAL                                                 '+'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                         $16     
         23        FETCH_LIST_R                                     $17     $16, 0
         24        ASSIGN                                                   !3, $17
         25        FREE                                                     $16
   12    26      > JMPZ                                                     !4, ->37
   13    27    >   IS_EQUAL                                                 !3, !4
         28      > JMPZ                                                     ~19, ->31
         29    >   PRE_INC                                                  !5
         30      > JMP                                                      ->37
   14    31    >   ADD                                              ~21     !4, 0.001
         32        IS_EQUAL                                                 !3, ~21
         33      > JMPZ                                                     ~22, ->36
         34    >   PRE_INC                                                  !6
         35      > JMP                                                      ->37
   16    36    >   PRE_INC                                                  !7
   23    37    >   ASSIGN                                                   !4, !3
   10    38      > JMP                                                      ->18
         39    >   FE_FREE                                                  $15
   25    40        INIT_FCALL                                               'var_dump'
         41        SEND_VAR                                                 !5
         42        DO_ICALL                                                 
   26    43        INIT_FCALL                                               'var_dump'
         44        SEND_VAR                                                 !6
         45        DO_ICALL                                                 
   27    46        INIT_FCALL                                               'var_dump'
         47        SEND_VAR                                                 !7
         48        DO_ICALL                                                 
         49      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.6 ms | 1400 KiB | 23 Q