3v4l.org

run code in 500+ PHP versions simultaneously
<?php $path = parse_url("national/italy/serie-a/20152016/s11663", PHP_URL_PATH); $pathFragmenst = (substr($path, -1) == '/') ? $pathFragments = explode('/', $path, -1) : $pathFragments = explode('/', $path); $end = end($pathFragments); var_dump($end);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 16
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BWjkd
function name:  (null)
number of ops:  31
compiled vars:  !0 = $path, !1 = $pathFragmenst, !2 = $pathFragments, !3 = $end
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'parse_url'
          1        SEND_VAL                                                     'national%2Fitaly%2Fserie-a%2F20152016%2Fs11663'
          2        SEND_VAL                                                     5
          3        DO_ICALL                                             $4      
          4        ASSIGN                                                       !0, $4
    4     5        FRAMELESS_ICALL_2                substr              ~6      !0, -1
          6        IS_EQUAL                                                     ~6, '%2F'
          7      > JMPZ                                                         ~7, ->16
    5     8    >   INIT_FCALL                                                   'explode'
          9        SEND_VAL                                                     '%2F'
         10        SEND_VAR                                                     !0
         11        SEND_VAL                                                     -1
         12        DO_ICALL                                             $8      
         13        ASSIGN                                               ~9      !2, $8
         14        QM_ASSIGN                                            ~10     ~9
         15      > JMP                                                          ->22
    6    16    >   INIT_FCALL                                                   'explode'
         17        SEND_VAL                                                     '%2F'
         18        SEND_VAR                                                     !0
         19        DO_ICALL                                             $11     
         20        ASSIGN                                               ~12     !2, $11
         21        QM_ASSIGN                                            ~10     ~12
    4    22    >   ASSIGN                                                       !1, ~10
    8    23        INIT_FCALL                                                   'end'
         24        SEND_REF                                                     !2
         25        DO_ICALL                                             $14     
         26        ASSIGN                                                       !3, $14
    9    27        INIT_FCALL                                                   'var_dump'
         28        SEND_VAR                                                     !3
         29        DO_ICALL                                                     
         30      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
173.67 ms | 2663 KiB | 17 Q