3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generateFor($length) { $buffer = ''; for ($i = 0; $i < $length; $i++) { $buffer .= chr(mt_rand(0, 255)); } return $buffer; } function generatPad($length) { $buffer = ''; for ($i = 0; $i < $length; $i++) { $buffer .= chr(mt_rand(0, 255)); } return $buffer; } echo generateFor(7);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Dbd71
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   INIT_FCALL                                               'generatefor'
          1        SEND_VAL                                                 7
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function generatefor:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
Branch analysis from position: 4
filename:       /in/Dbd71
function name:  generateFor
number of ops:  17
compiled vars:  !0 = $length, !1 = $buffer, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        ASSIGN                                                   !1, ''
    5     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->13
    6     4    >   INIT_FCALL                                               'chr'
          5        INIT_FCALL                                               'mt_rand'
          6        SEND_VAL                                                 0
          7        SEND_VAL                                                 255
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                         $6      
         11        ASSIGN_OP                                     8          !1, $6
    5    12        PRE_INC                                                  !2
         13    >   IS_SMALLER                                               !2, !0
         14      > JMPNZ                                                    ~9, ->4
    8    15    > > RETURN                                                   !1
    9    16*     > RETURN                                                   null

End of function generatefor

Function generatpad:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 15, Position 2 = 4
Branch analysis from position: 15
Branch analysis from position: 4
filename:       /in/Dbd71
function name:  generatPad
number of ops:  17
compiled vars:  !0 = $length, !1 = $buffer, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        ASSIGN                                                   !1, ''
   14     2        ASSIGN                                                   !2, 0
          3      > JMP                                                      ->13
   15     4    >   INIT_FCALL                                               'chr'
          5        INIT_FCALL                                               'mt_rand'
          6        SEND_VAL                                                 0
          7        SEND_VAL                                                 255
          8        DO_ICALL                                         $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                         $6      
         11        ASSIGN_OP                                     8          !1, $6
   14    12        PRE_INC                                                  !2
         13    >   IS_SMALLER                                               !2, !0
         14      > JMPNZ                                                    ~9, ->4
   17    15    > > RETURN                                                   !1
   18    16*     > RETURN                                                   null

End of function generatpad

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.82 ms | 1402 KiB | 18 Q