3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generateCode($length) { return bin2hex(openssl_random_pseudo_bytes($length / 2)); } var_dump(generateCode(6));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tQ85O
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'generatecode'
          2        SEND_VAL                                                 6
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function generatecode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tQ85O
function name:  generateCode
number of ops:  10
compiled vars:  !0 = $length
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'bin2hex'
          2        INIT_FCALL_BY_NAME                                       'openssl_random_pseudo_bytes'
          3        DIV                                              ~1      !0, 2
          4        SEND_VAL_EX                                              ~1
          5        DO_FCALL                                      0  $2      
          6        SEND_VAR                                                 $2
          7        DO_ICALL                                         $3      
          8      > RETURN                                                   $3
    4     9*     > RETURN                                                   null

End of function generatecode

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.28 ms | 1397 KiB | 18 Q