3v4l.org

run code in 300+ 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 = 11, Position 2 = 19
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/H7fP9
function name:  (null)
number of ops:  34
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%2F'
          2        SEND_VAL                                                 5
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !0, $4
    4     5        INIT_FCALL                                               'substr'
          6        SEND_VAR                                                 !0
          7        SEND_VAL                                                 -1
          8        DO_ICALL                                         $6      
          9        IS_EQUAL                                                 $6, '%2F'
         10      > JMPZ                                                     ~7, ->19
    5    11    >   INIT_FCALL                                               'explode'
         12        SEND_VAL                                                 '%2F'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 -1
         15        DO_ICALL                                         $8      
         16        ASSIGN                                           ~9      !2, $8
         17        QM_ASSIGN                                        ~10     ~9
         18      > JMP                                                      ->25
    6    19    >   INIT_FCALL                                               'explode'
         20        SEND_VAL                                                 '%2F'
         21        SEND_VAR                                                 !0
         22        DO_ICALL                                         $11     
         23        ASSIGN                                           ~12     !2, $11
         24        QM_ASSIGN                                        ~10     ~12
    4    25    >   ASSIGN                                                   !1, ~10
    8    26        INIT_FCALL                                               'end'
         27        SEND_REF                                                 !2
         28        DO_ICALL                                         $14     
         29        ASSIGN                                                   !3, $14
    9    30        INIT_FCALL                                               'var_dump'
         31        SEND_VAR                                                 !3
         32        DO_ICALL                                                 
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
294.82 ms | 1016 KiB | 18 Q