3v4l.org

run code in 300+ PHP versions simultaneously
<?php $length = 10; $bytes = openssl_random_pseudo_bytes(1); $longs = unpack("S*", $bytes); var_dump($bytes); var_dump($longs); foreach ($longs as $long) { var_dump($long / 0xffff); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 23
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/54iKN
function name:  (null)
number of ops:  25
compiled vars:  !0 = $length, !1 = $bytes, !2 = $longs, !3 = $long
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 10
    4     1        INIT_FCALL_BY_NAME                                       'openssl_random_pseudo_bytes'
          2        SEND_VAL_EX                                              1
          3        DO_FCALL                                      0  $5      
          4        ASSIGN                                                   !1, $5
    5     5        INIT_FCALL                                               'unpack'
          6        SEND_VAL                                                 'S%2A'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !2, $7
    7    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
    8    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !2
         15        DO_ICALL                                                 
   10    16      > FE_RESET_R                                       $11     !2, ->23
         17    > > FE_FETCH_R                                               $11, !3, ->23
   11    18    >   INIT_FCALL                                               'var_dump'
         19        DIV                                              ~12     !3, 65535
         20        SEND_VAL                                                 ~12
         21        DO_ICALL                                                 
   10    22      > JMP                                                      ->17
         23    >   FE_FREE                                                  $11
   12    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.1 ms | 1395 KiB | 17 Q