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(ord('`') + $k); break; } return $str; } echo rnd(-229985452);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2MDEB
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'rnd'
          1        SEND_VAL                                                 -229985452
          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 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 6
Branch analysis from position: 21
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 = 21
Branch analysis from position: 21
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
filename:       /in/2MDEB
function name:  rnd
number of ops:  23
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                                                      ->20
    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                                                      ->21
   13    14    >   INIT_FCALL                                               'chr'
         15        ADD                                              ~8      96, !2
         16        SEND_VAL                                                 ~8
         17        DO_ICALL                                         $9      
         18        ASSIGN_OP                                     8          !1, $9
   14    19      > JMP                                                      ->21
         20    > > JMPNZ                                                    <true>, ->6
   17    21    > > RETURN                                                   !1
   18    22*     > RETURN                                                   null

End of function rnd

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.57 ms | 1390 KiB | 20 Q