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,"/"); $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/oXJh7
function name:  (null)
number of ops:  25
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
   10    12        INIT_FCALL                                               'substr'
         13        SEND_VAR                                                 !2
         14        SEND_VAR                                                 !3
         15        DO_ICALL                                         $12     
         16        ASSIGN                                                   !4, $12
   11    17        ECHO                                                     '%3Cpre%3E'
   12    18        INIT_FCALL                                               'print_r'
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                                 
   13    21        INIT_FCALL                                               'print_r'
         22        SEND_VAR                                                 !4
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.4 ms | 1395 KiB | 21 Q