3v4l.org

run code in 300+ PHP versions simultaneously
<?php for ($i = -1; $i <= 24; $i++) { $bytes = openssl_random_pseudo_bytes($i, $cstrong); $hex = preg_replace('/[^a-zA-Z0-9]/', '', base64_encode($bytes)); echo "Lengths: Bytes: $i and Hex: " . strlen($hex) . PHP_EOL; var_dump($hex); var_dump($cstrong); echo PHP_EOL; } ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 31
Branch analysis from position: 31
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 2
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 33, Position 2 = 2
Branch analysis from position: 33
Branch analysis from position: 2
filename:       /in/4s2bm
function name:  (null)
number of ops:  34
compiled vars:  !0 = $i, !1 = $bytes, !2 = $cstrong, !3 = $hex
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, -1
          1      > JMP                                                      ->31
    3     2    >   INIT_FCALL_BY_NAME                                       'openssl_random_pseudo_bytes'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAR_EX                                              !2
          5        DO_FCALL                                      0  $5      
          6        ASSIGN                                                   !1, $5
    4     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%2F%5B%5Ea-zA-Z0-9%5D%2F'
          9        SEND_VAL                                                 ''
         10        INIT_FCALL                                               'base64_encode'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $7      
         13        SEND_VAR                                                 $7
         14        DO_ICALL                                         $8      
         15        ASSIGN                                                   !3, $8
    6    16        ROPE_INIT                                     3  ~11     'Lengths%3A+Bytes%3A+'
         17        ROPE_ADD                                      1  ~11     ~11, !0
         18        ROPE_END                                      2  ~10     ~11, '+and+Hex%3A+'
         19        STRLEN                                           ~13     !3
         20        CONCAT                                           ~14     ~10, ~13
         21        CONCAT                                           ~15     ~14, '%0A'
         22        ECHO                                                     ~15
    7    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !3
         25        DO_ICALL                                                 
    8    26        INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !2
         28        DO_ICALL                                                 
    9    29        ECHO                                                     '%0A'
    2    30        PRE_INC                                                  !0
         31    >   IS_SMALLER_OR_EQUAL                                      !0, 24
         32      > JMPNZ                                                    ~19, ->2
   11    33    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.62 ms | 1388 KiB | 19 Q