3v4l.org

run code in 300+ PHP versions simultaneously
<?php function build_order_no() { return date('Ymd').substr(implode(NULL, array_map('ord', str_split(substr(uniqid(), 7, 13), 1))), 0, 8); } $i = 10; while($i) { $no = build_order_no(); $uniqid = uniqid(); var_dump("$no\n$uniqid\n"); // file_put_contents('test.log', "$no\n$uniqid\n", FILE_APPEND); --$i; } echo PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 2
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 2
Branch analysis from position: 17
Branch analysis from position: 2
filename:       /in/Ll5ia
function name:  (null)
number of ops:  19
compiled vars:  !0 = $i, !1 = $no, !2 = $uniqid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                   !0, 10
    8     1      > JMP                                                      ->16
    9     2    >   INIT_FCALL                                               'build_order_no'
          3        DO_FCALL                                      0  $4      
          4        ASSIGN                                                   !1, $4
   10     5        INIT_FCALL                                               'uniqid'
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !2, $6
   12     8        INIT_FCALL                                               'var_dump'
          9        ROPE_INIT                                     4  ~9      !1
         10        ROPE_ADD                                      1  ~9      ~9, '%0A'
         11        ROPE_ADD                                      2  ~9      ~9, !2
         12        ROPE_END                                      3  ~8      ~9, '%0A'
         13        SEND_VAL                                                 ~8
         14        DO_ICALL                                                 
   13    15        PRE_DEC                                                  !0
    8    16    > > JMPNZ                                                    !0, ->2
   16    17    >   ECHO                                                     '%0A'
         18      > RETURN                                                   1

Function build_order_no:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ll5ia
function name:  build_order_no
number of ops:  30
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'date'
          1        SEND_VAL                                                 'Ymd'
          2        DO_ICALL                                         $0      
          3        INIT_FCALL                                               'substr'
          4        INIT_FCALL                                               'implode'
          5        SEND_VAL                                                 null
          6        INIT_FCALL                                               'array_map'
          7        SEND_VAL                                                 'ord'
          8        INIT_FCALL                                               'str_split'
          9        INIT_FCALL                                               'substr'
         10        INIT_FCALL                                               'uniqid'
         11        DO_ICALL                                         $1      
         12        SEND_VAR                                                 $1
         13        SEND_VAL                                                 7
         14        SEND_VAL                                                 13
         15        DO_ICALL                                         $2      
         16        SEND_VAR                                                 $2
         17        SEND_VAL                                                 1
         18        DO_ICALL                                         $3      
         19        SEND_VAR                                                 $3
         20        DO_ICALL                                         $4      
         21        SEND_VAR                                                 $4
         22        DO_ICALL                                         $5      
         23        SEND_VAR                                                 $5
         24        SEND_VAL                                                 0
         25        SEND_VAL                                                 8
         26        DO_ICALL                                         $6      
         27        CONCAT                                           ~7      $0, $6
         28      > RETURN                                                   ~7
    5    29*     > RETURN                                                   null

End of function build_order_no

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.22 ms | 1394 KiB | 28 Q