3v4l.org

run code in 300+ PHP versions simultaneously
<?php $file_id = 1; $project_id = 1; $token = $project_id; $expiry = strtotime('+1 years'); $signature = hash_hmac('sha256', "{$file_id}-{$token}-{$expiry}", "shared-secret"); $url = "https://media.example.com/{$file_id}?token={$token}&expiry={$expiry}&signature={$signature}"; var_dump($url);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HKkIZ
function name:  (null)
number of ops:  31
compiled vars:  !0 = $file_id, !1 = $project_id, !2 = $token, !3 = $expiry, !4 = $signature, !5 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 1
    3     1        ASSIGN                                                   !1, 1
    5     2        ASSIGN                                                   !2, !1
    6     3        INIT_FCALL                                               'strtotime'
          4        SEND_VAL                                                 '%2B1+years'
          5        DO_ICALL                                         $9      
          6        ASSIGN                                                   !3, $9
    7     7        INIT_FCALL                                               'hash_hmac'
          8        SEND_VAL                                                 'sha256'
          9        ROPE_INIT                                     5  ~12     !0
         10        ROPE_ADD                                      1  ~12     ~12, '-'
         11        ROPE_ADD                                      2  ~12     ~12, !2
         12        ROPE_ADD                                      3  ~12     ~12, '-'
         13        ROPE_END                                      4  ~11     ~12, !3
         14        SEND_VAL                                                 ~11
         15        SEND_VAL                                                 'shared-secret'
         16        DO_ICALL                                         $15     
         17        ASSIGN                                                   !4, $15
    8    18        ROPE_INIT                                     8  ~18     'https%3A%2F%2Fmedia.example.com%2F'
         19        ROPE_ADD                                      1  ~18     ~18, !0
         20        ROPE_ADD                                      2  ~18     ~18, '%3Ftoken%3D'
         21        ROPE_ADD                                      3  ~18     ~18, !2
         22        ROPE_ADD                                      4  ~18     ~18, '%26expiry%3D'
         23        ROPE_ADD                                      5  ~18     ~18, !3
         24        ROPE_ADD                                      6  ~18     ~18, '%26signature%3D'
         25        ROPE_END                                      7  ~17     ~18, !4
         26        ASSIGN                                                   !5, ~17
   10    27        INIT_FCALL                                               'var_dump'
         28        SEND_VAR                                                 !5
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.39 ms | 1396 KiB | 19 Q