3v4l.org

run code in 500+ PHP versions simultaneously
<?php $url = 'https://photoland2.etrafficgroup.com.au/frames-and-albums/frames/wooden-frames/106-a3-297-x-42cm-2/product/555-black-wooden-frame-with-gold-stripe-a3-42x29-7cm-size-1-7cm-wide/'; $initial = parse_url($url); $result = array_filter(explode('/',parse_url($url)['path'])); unset($result[4]); $filtered = implode('/',$result); echo $initial['scheme'].'://'.$initial['host'].'/'.$filtered; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/60rZB
function name:  (null)
number of ops:  28
compiled vars:  !0 = $url, !1 = $initial, !2 = $result, !3 = $filtered
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'https%3A%2F%2Fphotoland2.etrafficgroup.com.au%2Fframes-and-albums%2Fframes%2Fwooden-frames%2F106-a3-297-x-42cm-2%2Fproduct%2F555-black-wooden-frame-with-gold-stripe-a3-42x29-7cm-size-1-7cm-wide%2F'
    4     1        INIT_FCALL                                                   'parse_url'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $5      
          4        ASSIGN                                                       !1, $5
    5     5        INIT_FCALL                                                   'array_filter'
          6        INIT_FCALL                                                   'explode'
          7        SEND_VAL                                                     '%2F'
          8        INIT_FCALL                                                   'parse_url'
          9        SEND_VAR                                                     !0
         10        DO_ICALL                                             $7      
         11        FETCH_DIM_R                                          ~8      $7, 'path'
         12        SEND_VAL                                                     ~8
         13        DO_ICALL                                             $9      
         14        SEND_VAR                                                     $9
         15        DO_ICALL                                             $10     
         16        ASSIGN                                                       !2, $10
    6    17        UNSET_DIM                                                    !2, 4
    7    18        FRAMELESS_ICALL_2                implode             ~12     '%2F', !2
         19        ASSIGN                                                       !3, ~12
    9    20        FETCH_DIM_R                                          ~14     !1, 'scheme'
         21        CONCAT                                               ~15     ~14, '%3A%2F%2F'
         22        FETCH_DIM_R                                          ~16     !1, 'host'
         23        CONCAT                                               ~17     ~15, ~16
         24        CONCAT                                               ~18     ~17, '%2F'
         25        CONCAT                                               ~19     ~18, !3
         26        ECHO                                                         ~19
   10    27      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
158.55 ms | 2135 KiB | 16 Q