3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Tracking { #function __construct($client) {} function generateID($length) { $id = $client; $x = 0; while ($x < $length) { $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890123456789'; $id .= substr($chars, mt_rand(0, strlen($chars) - 1), 1); } return $id; } } $parcel = new Tracking(1426); echo $parcel->generateID(20);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EfjNt
function name:  (null)
number of ops:  9
compiled vars:  !0 = $parcel
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   NEW                                              $1      'Tracking'
          1        SEND_VAL_EX                                              1426
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   26     4        INIT_METHOD_CALL                                         !0, 'generateID'
          5        SEND_VAL_EX                                              20
          6        DO_FCALL                                      0  $4      
          7        ECHO                                                     $4
          8      > RETURN                                                   1

Class Tracking:
Function generateid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 4
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 19, Position 2 = 4
Branch analysis from position: 19
Branch analysis from position: 4
filename:       /in/EfjNt
function name:  generateID
number of ops:  21
compiled vars:  !0 = $length, !1 = $id, !2 = $client, !3 = $x, !4 = $chars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ASSIGN                                                   !1, !2
   10     2        ASSIGN                                                   !3, 0
   11     3      > JMP                                                      ->17
   12     4    >   ASSIGN                                                   !4, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890123456789'
   14     5        INIT_FCALL                                               'substr'
          6        SEND_VAR                                                 !4
          7        INIT_FCALL                                               'mt_rand'
          8        SEND_VAL                                                 0
          9        STRLEN                                           ~8      !4
         10        SUB                                              ~9      ~8, 1
         11        SEND_VAL                                                 ~9
         12        DO_ICALL                                         $10     
         13        SEND_VAR                                                 $10
         14        SEND_VAL                                                 1
         15        DO_ICALL                                         $11     
         16        ASSIGN_OP                                     8          !1, $11
   11    17    >   IS_SMALLER                                               !3, !0
         18      > JMPNZ                                                    ~13, ->4
   17    19    > > RETURN                                                   !1
   19    20*     > RETURN                                                   null

End of function generateid

End of class Tracking.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.56 ms | 1396 KiB | 17 Q