3v4l.org

run code in 300+ PHP versions simultaneously
<?php $current = null; $count = 0; while ($current !== 0) { $count++; $bytes = openssl_random_pseudo_bytes(2); $current = unpack("S", $bytes); var_dump($current); } var_dump($count);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 3
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 3
Branch analysis from position: 18
Branch analysis from position: 3
filename:       /in/Y3vE4
function name:  (null)
number of ops:  22
compiled vars:  !0 = $current, !1 = $count, !2 = $bytes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, null
    4     1        ASSIGN                                                   !1, 0
    7     2      > JMP                                                      ->16
    8     3    >   PRE_INC                                                  !1
    9     4        INIT_FCALL_BY_NAME                                       'openssl_random_pseudo_bytes'
          5        SEND_VAL_EX                                              2
          6        DO_FCALL                                      0  $6      
          7        ASSIGN                                                   !2, $6
   10     8        INIT_FCALL                                               'unpack'
          9        SEND_VAL                                                 'S'
         10        SEND_VAR                                                 !2
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !0, $8
   11    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
    7    16    >   IS_NOT_IDENTICAL                                         !0, 0
         17      > JMPNZ                                                    ~11, ->3
   14    18    >   INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.43 ms | 1395 KiB | 17 Q