3v4l.org

run code in 300+ PHP versions simultaneously
<?php function random($car) { $string = ""; $chaine = "abcdefghijklmnpqrstuvwxy"; srand((double)microtime()*1000000); for($i=0; $i<$car; $i++) { $string .= $chaine[rand()%strlen($chaine)]; } return $string; } // APPEL // Génère une chaine de longueur 20 $chaine = random(4); echo $chaine; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4GMou
function name:  (null)
number of ops:  6
compiled vars:  !0 = $chaine
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'random'
          1        SEND_VAL                                                 4
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   16     4        ECHO                                                     !0
   17     5      > RETURN                                                   1

Function random:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 12
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 21, Position 2 = 12
Branch analysis from position: 21
Branch analysis from position: 12
filename:       /in/4GMou
function name:  random
number of ops:  23
compiled vars:  !0 = $car, !1 = $string, !2 = $chaine, !3 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, ''
    5     2        ASSIGN                                                   !2, 'abcdefghijklmnpqrstuvwxy'
    6     3        INIT_FCALL                                               'srand'
          4        INIT_FCALL                                               'microtime'
          5        DO_ICALL                                         $6      
          6        CAST                                          5  ~7      $6
          7        MUL                                              ~8      ~7, 1000000
          8        SEND_VAL                                                 ~8
          9        DO_ICALL                                                 
    7    10        ASSIGN                                                   !3, 0
         11      > JMP                                                      ->19
    8    12    >   INIT_FCALL                                               'rand'
         13        DO_ICALL                                         $11     
         14        STRLEN                                           ~12     !2
         15        MOD                                              ~13     $11, ~12
         16        FETCH_DIM_R                                      ~14     !2, ~13
         17        ASSIGN_OP                                     8          !1, ~14
    7    18        PRE_INC                                                  !3
         19    >   IS_SMALLER                                               !3, !0
         20      > JMPNZ                                                    ~17, ->12
   10    21    > > RETURN                                                   !1
   11    22*     > RETURN                                                   null

End of function random

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.1 ms | 1390 KiB | 20 Q