3v4l.org

run code in 300+ PHP versions simultaneously
<?php $adres = "pl/blog/2016/11/08/raiffeisen-polbank-mobilny-portfel/"; echo $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); echo $adres; if(strstr($adres, "blog")!=FALSE){ $url=explode("/", $adres); $size=count($url); echo "\n"; echo $url[$size-2]; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 30
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 30
filename:       /in/bCCD2
function name:  (null)
number of ops:  31
compiled vars:  !0 = $adres, !1 = $uri, !2 = $url, !3 = $size
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        INIT_FCALL                                               'rtrim'
          2        INIT_FCALL                                               'dirname'
          3        FETCH_R                      global              ~5      '_SERVER'
          4        FETCH_DIM_R                                      ~6      ~5, 'PHP_SELF'
          5        SEND_VAL                                                 ~6
          6        DO_ICALL                                         $7      
          7        SEND_VAR                                                 $7
          8        SEND_VAL                                                 '%2F%5C'
          9        DO_ICALL                                         $8      
         10        ASSIGN                                           ~9      !1, $8
         11        ECHO                                                     ~9
    4    12        ECHO                                                     !0
    5    13        INIT_FCALL                                               'strstr'
         14        SEND_VAR                                                 !0
         15        SEND_VAL                                                 'blog'
         16        DO_ICALL                                         $10     
         17        BOOL                                             ~11     $10
         18      > JMPZ                                                     ~11, ->30
    6    19    >   INIT_FCALL                                               'explode'
         20        SEND_VAL                                                 '%2F'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $12     
         23        ASSIGN                                                   !2, $12
    7    24        COUNT                                            ~14     !2
         25        ASSIGN                                                   !3, ~14
    8    26        ECHO                                                     '%0A'
    9    27        SUB                                              ~16     !3, 2
         28        FETCH_DIM_R                                      ~17     !2, ~16
         29        ECHO                                                     ~17
   10    30    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.94 ms | 1396 KiB | 21 Q