3v4l.org

run code in 300+ PHP versions simultaneously
<?php // seed with microseconds function make_seed() { $time = microtime(); echo $time; echo '<pre>';print_r(explode(' ', $time)); list($usec, $sec) = explode(' ', $time); return (float) $sec + ((float) $usec * 100000); } //mt_srand(make_seed()); $randval = mt_rand(); echo $randval;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/icQWH
function name:  (null)
number of ops:  5
compiled vars:  !0 = $randval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'mt_rand'
          1        DO_ICALL                                         $1      
          2        ASSIGN                                                   !0, $1
   14     3        ECHO                                                     !0
          4      > RETURN                                                   1

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

End of function make_seed

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.34 ms | 1396 KiB | 21 Q