3v4l.org

run code in 300+ PHP versions simultaneously
<?php function build_order_no() { mt_srand((double) microtime() * 1000000); return date('Ymd') . str_pad(mt_rand(1, 99999999), 8, '0', STR_PAD_LEFT); } $i = 10; while($i) { var_dump(build_order_no()); --$i; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 2
Branch analysis from position: 9
Branch analysis from position: 2
filename:       /in/YI9NF
function name:  (null)
number of ops:  10
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, 10
    9     1      > JMP                                                      ->8
   10     2    >   INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'build_order_no'
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR                                                 $2
          6        DO_ICALL                                                 
   11     7        PRE_DEC                                                  !0
    9     8    > > JMPNZ                                                    !0, ->2
   12     9    > > RETURN                                                   1

Function build_order_no:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YI9NF
function name:  build_order_no
number of ops:  23
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'mt_srand'
          1        INIT_FCALL                                               'microtime'
          2        DO_ICALL                                         $0      
          3        CAST                                          5  ~1      $0
          4        MUL                                              ~2      ~1, 1000000
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                                 
    5     7        INIT_FCALL                                               'date'
          8        SEND_VAL                                                 'Ymd'
          9        DO_ICALL                                         $4      
         10        INIT_FCALL                                               'str_pad'
         11        INIT_FCALL                                               'mt_rand'
         12        SEND_VAL                                                 1
         13        SEND_VAL                                                 99999999
         14        DO_ICALL                                         $5      
         15        SEND_VAR                                                 $5
         16        SEND_VAL                                                 8
         17        SEND_VAL                                                 '0'
         18        SEND_VAL                                                 0
         19        DO_ICALL                                         $6      
         20        CONCAT                                           ~7      $4, $6
         21      > RETURN                                                   ~7
    6    22*     > RETURN                                                   null

End of function build_order_no

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.34 ms | 1399 KiB | 26 Q