3v4l.org

run code in 300+ PHP versions simultaneously
<?php $imageURL = "http://images.moneysavingexpert.com/images/warmth-alerts-illustrations.png"; $parts = parse_url($imageURL); $path = $parts['path']; $lastSlash = strrpos($path,"/"); $lastSlash++; $imageName = substr($path, $lastSlash); echo "<pre>"; print_r($parts); print_r($imageName);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MEtJt
function name:  (null)
number of ops:  26
compiled vars:  !0 = $imageURL, !1 = $parts, !2 = $path, !3 = $lastSlash, !4 = $imageName
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fimages.moneysavingexpert.com%2Fimages%2Fwarmth-alerts-illustrations.png'
    5     1        INIT_FCALL                                               'parse_url'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
    6     5        FETCH_DIM_R                                      ~8      !1, 'path'
          6        ASSIGN                                                   !2, ~8
    8     7        INIT_FCALL                                               'strrpos'
          8        SEND_VAR                                                 !2
          9        SEND_VAL                                                 '%2F'
         10        DO_ICALL                                         $10     
         11        ASSIGN                                                   !3, $10
    9    12        PRE_INC                                                  !3
   11    13        INIT_FCALL                                               'substr'
         14        SEND_VAR                                                 !2
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                         $13     
         17        ASSIGN                                                   !4, $13
   12    18        ECHO                                                     '%3Cpre%3E'
   13    19        INIT_FCALL                                               'print_r'
         20        SEND_VAR                                                 !1
         21        DO_ICALL                                                 
   14    22        INIT_FCALL                                               'print_r'
         23        SEND_VAR                                                 !4
         24        DO_ICALL                                                 
         25      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.66 ms | 1395 KiB | 21 Q