3v4l.org

run code in 300+ PHP versions simultaneously
<?php $guidstr = ""; for ($i=1;$i <= 16;$i++) { $b = (int)rand(0,0xff); if ($i == 7) { $b &= 0x0f; $b |= 0x40; } // version 4 (random) if ($i == 9) { $b &= 0x3f; $b |= 0x80; } // variant $guidstr .= sprintf("%02s", base_convert($b,10,16)); echo $guidstr.PHP_EOL; if ($i == 4 || $i == 6 || $i == 8 || $i == 10) { $guidstr .= '-'; } } echo $guidstr;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 42
Branch analysis from position: 42
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 3
Branch analysis from position: 44
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
2 jumps found. (Code = 47) Position 1 = 31, Position 2 = 33
Branch analysis from position: 31
2 jumps found. (Code = 47) Position 1 = 34, Position 2 = 36
Branch analysis from position: 34
2 jumps found. (Code = 47) Position 1 = 37, Position 2 = 39
Branch analysis from position: 37
2 jumps found. (Code = 43) Position 1 = 40, Position 2 = 41
Branch analysis from position: 40
2 jumps found. (Code = 44) Position 1 = 44, Position 2 = 3
Branch analysis from position: 44
Branch analysis from position: 3
Branch analysis from position: 41
Branch analysis from position: 39
Branch analysis from position: 36
Branch analysis from position: 33
Branch analysis from position: 17
Branch analysis from position: 13
filename:       /in/4D5eY
function name:  (null)
number of ops:  46
compiled vars:  !0 = $guidstr, !1 = $i, !2 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, ''
    4     1        ASSIGN                                                   !1, 1
          2      > JMP                                                      ->42
    5     3    >   INIT_FCALL                                               'rand'
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 255
          6        DO_ICALL                                         $5      
          7        CAST                                          4  ~6      $5
          8        ASSIGN                                                   !2, ~6
    6     9        IS_EQUAL                                                 !1, 7
         10      > JMPZ                                                     ~8, ->13
         11    >   ASSIGN_OP                                    10          !2, 15
         12        ASSIGN_OP                                     9          !2, 64
    7    13    >   IS_EQUAL                                                 !1, 9
         14      > JMPZ                                                     ~11, ->17
         15    >   ASSIGN_OP                                    10          !2, 63
         16        ASSIGN_OP                                     9          !2, 128
    8    17    >   INIT_FCALL                                               'sprintf'
         18        SEND_VAL                                                 '%2502s'
         19        INIT_FCALL                                               'base_convert'
         20        SEND_VAR                                                 !2
         21        SEND_VAL                                                 10
         22        SEND_VAL                                                 16
         23        DO_ICALL                                         $14     
         24        SEND_VAR                                                 $14
         25        DO_ICALL                                         $15     
         26        ASSIGN_OP                                     8          !0, $15
    9    27        CONCAT                                           ~17     !0, '%0A'
         28        ECHO                                                     ~17
   10    29        IS_EQUAL                                         ~18     !1, 4
         30      > JMPNZ_EX                                         ~18     ~18, ->33
         31    >   IS_EQUAL                                         ~19     !1, 6
         32        BOOL                                             ~18     ~19
         33    > > JMPNZ_EX                                         ~18     ~18, ->36
         34    >   IS_EQUAL                                         ~20     !1, 8
         35        BOOL                                             ~18     ~20
         36    > > JMPNZ_EX                                         ~18     ~18, ->39
         37    >   IS_EQUAL                                         ~21     !1, 10
         38        BOOL                                             ~18     ~21
         39    > > JMPZ                                                     ~18, ->41
         40    >   ASSIGN_OP                                     8          !0, '-'
    4    41    >   PRE_INC                                                  !1
         42    >   IS_SMALLER_OR_EQUAL                                      !1, 16
         43      > JMPNZ                                                    ~24, ->3
   12    44    >   ECHO                                                     !0
         45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.97 ms | 1392 KiB | 19 Q