3v4l.org

run code in 300+ PHP versions simultaneously
<?php $n = 12; echo base64_encode(strong_random_bytes(intval(ceil($n * 3 / 4)))); echo substr(str_replace(['/', '+', '='], ['', '', ''], base64_encode(strong_random_bytes($n))), 0, $n);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BFMLW
function name:  (null)
number of ops:  32
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 12
    5     1        INIT_FCALL                                               'base64_encode'
          2        INIT_FCALL_BY_NAME                                       'strong_random_bytes'
          3        INIT_FCALL                                               'ceil'
          4        MUL                                              ~2      !0, 3
          5        DIV                                              ~3      ~2, 4
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                         $4      
          8        CAST                                          4  ~5      $4
          9        SEND_VAL_EX                                              ~5
         10        DO_FCALL                                      0  $6      
         11        SEND_VAR                                                 $6
         12        DO_ICALL                                         $7      
         13        ECHO                                                     $7
    6    14        INIT_FCALL                                               'substr'
         15        INIT_FCALL                                               'str_replace'
         16        SEND_VAL                                                 <array>
         17        SEND_VAL                                                 <array>
         18        INIT_FCALL                                               'base64_encode'
         19        INIT_FCALL_BY_NAME                                       'strong_random_bytes'
         20        SEND_VAR_EX                                              !0
         21        DO_FCALL                                      0  $8      
         22        SEND_VAR                                                 $8
         23        DO_ICALL                                         $9      
         24        SEND_VAR                                                 $9
         25        DO_ICALL                                         $10     
         26        SEND_VAR                                                 $10
         27        SEND_VAL                                                 0
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $11     
         30        ECHO                                                     $11
         31      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.07 ms | 1395 KiB | 21 Q