3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://cmps.cz/i/nar/YT-1954.jpg'; $urlName = urldecode(trim($url)); $urlParts = parse_url($urlName); var_dump(basename($urlParts['path']));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l3qWL
function name:  (null)
number of ops:  20
compiled vars:  !0 = $url, !1 = $urlName, !2 = $urlParts
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fcmps.cz%2Fi%2Fnar%2FYT-1954.jpg'
    4     1        INIT_FCALL                                               'urldecode'
          2        INIT_FCALL                                               'trim'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        SEND_VAR                                                 $4
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !1, $5
    5     8        INIT_FCALL                                               'parse_url'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                         $7      
         11        ASSIGN                                                   !2, $7
    6    12        INIT_FCALL                                               'var_dump'
         13        INIT_FCALL                                               'basename'
         14        FETCH_DIM_R                                      ~9      !2, 'path'
         15        SEND_VAL                                                 ~9
         16        DO_ICALL                                         $10     
         17        SEND_VAR                                                 $10
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
172.54 ms | 1399 KiB | 23 Q