3v4l.org

run code in 300+ PHP versions simultaneously
<?php function uuid() { $x4 = function() { $n = ''; while (strlen($n) < 4) { $n = $n.mt_rand(); } return substr($n, -4); }; return sprintf( '%s-%04x-%04x-%04x-%04x%04x%04x', time(), $x4(), $x4(), $x4(), $x4(), $x4(), $x4(), $x4() ); } echo uuid();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kMcT5
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'uuid'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
          3      > RETURN                                                   1

Function uuid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kMcT5
function name:  uuid
number of ops:  31
compiled vars:  !0 = $x4
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FkMcT5%3A4%240'
          1        ASSIGN                                                   !0, ~1
   11     2        INIT_FCALL                                               'sprintf'
   12     3        SEND_VAL                                                 '%25s-%2504x-%2504x-%2504x-%2504x%2504x%2504x'
   13     4        INIT_FCALL                                               'time'
          5        DO_ICALL                                         $3      
          6        SEND_VAR                                                 $3
          7        INIT_DYNAMIC_CALL                                        !0
          8        DO_FCALL                                      0  $4      
          9        SEND_VAR                                                 $4
         10        INIT_DYNAMIC_CALL                                        !0
         11        DO_FCALL                                      0  $5      
         12        SEND_VAR                                                 $5
         13        INIT_DYNAMIC_CALL                                        !0
         14        DO_FCALL                                      0  $6      
         15        SEND_VAR                                                 $6
         16        INIT_DYNAMIC_CALL                                        !0
         17        DO_FCALL                                      0  $7      
         18        SEND_VAR                                                 $7
         19        INIT_DYNAMIC_CALL                                        !0
         20        DO_FCALL                                      0  $8      
         21        SEND_VAR                                                 $8
         22        INIT_DYNAMIC_CALL                                        !0
         23        DO_FCALL                                      0  $9      
         24        SEND_VAR                                                 $9
         25        INIT_DYNAMIC_CALL                                        !0
         26        DO_FCALL                                      0  $10     
         27        SEND_VAR                                                 $10
         28        DO_ICALL                                         $11     
         29      > RETURN                                                   $11
   15    30*     > RETURN                                                   null

End of function uuid

Function %00%7Bclosure%7D%2Fin%2FkMcT5%3A4%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
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/kMcT5
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   ASSIGN                                                   !0, ''
    6     1      > JMP                                                      ->6
    7     2    >   INIT_FCALL                                               'mt_rand'
          3        DO_ICALL                                         $2      
          4        CONCAT                                           ~3      !0, $2
          5        ASSIGN                                                   !0, ~3
    6     6    >   STRLEN                                           ~5      !0
          7        IS_SMALLER                                               ~5, 4
          8      > JMPNZ                                                    ~6, ->2
    9     9    >   INIT_FCALL                                               'substr'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 -4
         12        DO_ICALL                                         $7      
         13      > RETURN                                                   $7
   10    14*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FkMcT5%3A4%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.13 ms | 1403 KiB | 22 Q