3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.56 ms | 1399 KiB | 19 Q