3v4l.org

run code in 300+ PHP versions simultaneously
<?php $numberOfShards = 20; $route = '/ca/living/articles/839577/3-essential-software-buys-for-teens'; $site = 'sheknows.com'; $type = 301; $dest = 'http://somewhere.com'; $shard = floor(crc32($route) % $numberOfShards); $key = sprintf('redirects:%s:%s', $site, $shard); echo $key;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/uhUYn
function name:  (null)
number of ops:  21
compiled vars:  !0 = $numberOfShards, !1 = $route, !2 = $site, !3 = $type, !4 = $dest, !5 = $shard, !6 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 20
    4     1        ASSIGN                                                   !1, '%2Fca%2Fliving%2Farticles%2F839577%2F3-essential-software-buys-for-teens'
    5     2        ASSIGN                                                   !2, 'sheknows.com'
    6     3        ASSIGN                                                   !3, 301
    7     4        ASSIGN                                                   !4, 'http%3A%2F%2Fsomewhere.com'
    9     5        INIT_FCALL                                               'floor'
          6        INIT_FCALL                                               'crc32'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                         $12     
          9        MOD                                              ~13     $12, !0
         10        SEND_VAL                                                 ~13
         11        DO_ICALL                                         $14     
         12        ASSIGN                                                   !5, $14
   11    13        INIT_FCALL                                               'sprintf'
         14        SEND_VAL                                                 'redirects%3A%25s%3A%25s'
         15        SEND_VAR                                                 !2
         16        SEND_VAR                                                 !5
         17        DO_ICALL                                         $16     
         18        ASSIGN                                                   !6, $16
   12    19        ECHO                                                     !6
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.69 ms | 1386 KiB | 19 Q