3v4l.org

run code in 300+ PHP versions simultaneously
<?php function rnd($seed) { srand($seed); $str = ''; for (;;) { $k = rand(0, 27); if ($k == 0) { break; } $str .= chr(90 + $k); } return $str; } echo rnd(-229985451);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EfVVA
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   19     0  E >   INIT_FCALL                                               'rnd'
          1        SEND_VAL                                                 -229985451
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function rnd:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 6
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 6
Branch analysis from position: 20
Branch analysis from position: 6
filename:       /in/EfVVA
function name:  rnd
number of ops:  22
compiled vars:  !0 = $seed, !1 = $str, !2 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'srand'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    6     4        ASSIGN                                                   !1, ''
    8     5      > JMP                                                      ->19
    9     6    >   INIT_FCALL                                               'rand'
          7        SEND_VAL                                                 0
          8        SEND_VAL                                                 27
          9        DO_ICALL                                         $5      
         10        ASSIGN                                                   !2, $5
   10    11        IS_EQUAL                                                 !2, 0
         12      > JMPZ                                                     ~7, ->14
   11    13    > > JMP                                                      ->20
   13    14    >   INIT_FCALL                                               'chr'
         15        ADD                                              ~8      90, !2
         16        SEND_VAL                                                 ~8
         17        DO_ICALL                                         $9      
         18        ASSIGN_OP                                     8          !1, $9
         19    > > JMPNZ                                                    <true>, ->6
   16    20    > > RETURN                                                   !1
   17    21*     > RETURN                                                   null

End of function rnd

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.06 ms | 1399 KiB | 20 Q