3v4l.org

run code in 300+ PHP versions simultaneously
<?php $random_string = function($length) { $bag = str_split('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'); $string = ''; while ($length--) { $string .= $bag[array_rand($bag)]; } return $string; }; $client_id = $random_string(16); $raw_hash = hash('sha256', uniqid(microtime(1), true), true); $client_secret = base64_encode($raw_hash); var_dump($client_id); var_dump($client_secret);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WeLDP
function name:  (null)
number of ops:  30
compiled vars:  !0 = $random_string, !1 = $client_id, !2 = $raw_hash, !3 = $client_secret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FWeLDP%3A3%240'
          1        ASSIGN                                                   !0, ~4
   12     2        INIT_DYNAMIC_CALL                                        !0
          3        SEND_VAL_EX                                              16
          4        DO_FCALL                                      0  $6      
          5        ASSIGN                                                   !1, $6
   14     6        INIT_FCALL                                               'hash'
          7        SEND_VAL                                                 'sha256'
          8        INIT_FCALL                                               'uniqid'
          9        INIT_FCALL                                               'microtime'
         10        SEND_VAL                                                 1
         11        DO_ICALL                                         $8      
         12        SEND_VAR                                                 $8
         13        SEND_VAL                                                 <true>
         14        DO_ICALL                                         $9      
         15        SEND_VAR                                                 $9
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $10     
         18        ASSIGN                                                   !2, $10
   15    19        INIT_FCALL                                               'base64_encode'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                         $12     
         22        ASSIGN                                                   !3, $12
   17    23        INIT_FCALL                                               'var_dump'
         24        SEND_VAR                                                 !1
         25        DO_ICALL                                                 
   18    26        INIT_FCALL                                               'var_dump'
         27        SEND_VAR                                                 !3
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FWeLDP%3A3%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
Branch analysis from position: 7
filename:       /in/WeLDP
function name:  {closure}
number of ops:  16
compiled vars:  !0 = $length, !1 = $bag, !2 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'str_split'
          2        SEND_VAL                                                 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    5     5        ASSIGN                                                   !2, ''
    6     6      > JMP                                                      ->12
    7     7    >   INIT_FCALL                                               'array_rand'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $6      
         10        FETCH_DIM_R                                      ~7      !1, $6
         11        ASSIGN_OP                                     8          !2, ~7
    6    12    >   POST_DEC                                         ~9      !0
         13      > JMPNZ                                                    ~9, ->7
    9    14    > > RETURN                                                   !2
   10    15*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FWeLDP%3A3%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.36 ms | 1400 KiB | 27 Q