3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tmp = writeBookmark(17); //debug readBookmark($tmp); //debug // Bookmark Encode Function (one site) function writeBookmark($site) { $site = intval($site); $ts = timeStamp(); // calulates the size of the site id (posible options: 1,2,3,4) $site_id_size = strlen($site); // concatonate site id size, timestamp and site id $decoded_num = $site_id_size . $ts . $site; // Encode timestamp (Base 36) $encoded_num = fromDecimalToBase($decoded_num,36); return $encoded_num; //debug }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bD3eT
function name:  (null)
number of ops:  8
compiled vars:  !0 = $tmp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL_BY_NAME                                       'writeBookmark'
          1        SEND_VAL_EX                                              17
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
    5     4        INIT_FCALL_BY_NAME                                       'readBookmark'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   20     7      > RETURN                                                   1

Function writebookmark:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bD3eT
function name:  writeBookmark
number of ops:  18
compiled vars:  !0 = $site, !1 = $ts, !2 = $site_id_size, !3 = $decoded_num, !4 = $encoded_num
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        CAST                                          4  ~5      !0
          2        ASSIGN                                                   !0, ~5
   10     3        INIT_FCALL_BY_NAME                                       'timeStamp'
          4        DO_FCALL                                      0  $7      
          5        ASSIGN                                                   !1, $7
   12     6        STRLEN                                           ~9      !0
          7        ASSIGN                                                   !2, ~9
   14     8        CONCAT                                           ~11     !2, !1
          9        CONCAT                                           ~12     ~11, !0
         10        ASSIGN                                                   !3, ~12
   16    11        INIT_FCALL_BY_NAME                                       'fromDecimalToBase'
         12        SEND_VAR_EX                                              !3
         13        SEND_VAL_EX                                              36
         14        DO_FCALL                                      0  $14     
         15        ASSIGN                                                   !4, $14
   18    16      > RETURN                                                   !4
   20    17*     > RETURN                                                   null

End of function writebookmark

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.06 ms | 1394 KiB | 13 Q