3v4l.org

run code in 300+ PHP versions simultaneously
<?php $adres = "pl/blog/2016/11/08/raiffeisen-polbank-mobilny-portfel/"; echo $adres; if(strstr($adres, "blog")!=FALSE){ $url=explode("/", $adres); $size=count($url); echo "\n"; $goto = $url[$size-2]; echo $goto; header("Location: /$goto"); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 25
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/RQju5
function name:  (null)
number of ops:  26
compiled vars:  !0 = $adres, !1 = $url, !2 = $size, !3 = $goto
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'pl%2Fblog%2F2016%2F11%2F08%2Fraiffeisen-polbank-mobilny-portfel%2F'
    3     1        ECHO                                                     !0
    4     2        INIT_FCALL                                               'strstr'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 'blog'
          5        DO_ICALL                                         $5      
          6        BOOL                                             ~6      $5
          7      > JMPZ                                                     ~6, ->25
    5     8    >   INIT_FCALL                                               'explode'
          9        SEND_VAL                                                 '%2F'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !1, $7
    6    13        COUNT                                            ~9      !1
         14        ASSIGN                                                   !2, ~9
    7    15        ECHO                                                     '%0A'
    8    16        SUB                                              ~11     !2, 2
         17        FETCH_DIM_R                                      ~12     !1, ~11
         18        ASSIGN                                                   !3, ~12
    9    19        ECHO                                                     !3
   10    20        INIT_FCALL                                               'header'
         21        NOP                                                      
         22        FAST_CONCAT                                      ~14     'Location%3A+%2F', !3
         23        SEND_VAL                                                 ~14
         24        DO_ICALL                                                 
   11    25    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.01 ms | 1395 KiB | 19 Q