3v4l.org

run code in 300+ PHP versions simultaneously
<?php function make_seed() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } mt_srand(make_seed()); $randval = mt_rand()%5000; echo $randval ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4gbv8
function name:  (null)
number of ops:  11
compiled vars:  !0 = $randval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'mt_srand'
          1        INIT_FCALL                                               'make_seed'
          2        DO_FCALL                                      0  $1      
          3        SEND_VAR                                                 $1
          4        DO_ICALL                                                 
    8     5        INIT_FCALL                                               'mt_rand'
          6        DO_ICALL                                         $3      
          7        MOD                                              ~4      $3, 5000
          8        ASSIGN                                                   !0, ~4
    9     9        ECHO                                                     !0
   11    10      > RETURN                                                   1

Function make_seed:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4gbv8
function name:  make_seed
number of ops:  17
compiled vars:  !0 = $usec, !1 = $sec
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'explode'
          1        SEND_VAL                                                 '+'
          2        INIT_FCALL                                               'microtime'
          3        DO_ICALL                                         $2      
          4        SEND_VAR                                                 $2
          5        DO_ICALL                                         $3      
          6        FETCH_LIST_R                                     $4      $3, 0
          7        ASSIGN                                                   !0, $4
          8        FETCH_LIST_R                                     $6      $3, 1
          9        ASSIGN                                                   !1, $6
         10        FREE                                                     $3
    5    11        CAST                                          5  ~8      !1
         12        CAST                                          5  ~9      !0
         13        MUL                                              ~10     ~9, 100000
         14        ADD                                              ~11     ~8, ~10
         15      > RETURN                                                   ~11
    6    16*     > RETURN                                                   null

End of function make_seed

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.62 ms | 1398 KiB | 22 Q