3v4l.org

run code in 300+ 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:  31
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        INIT_FCALL                                               'implode'
         19        SEND_VAL                                                 '%2F'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                         $12     
         22        ASSIGN                                                   !3, $12
    9    23        FETCH_DIM_R                                      ~14     !1, 'scheme'
         24        CONCAT                                           ~15     ~14, '%3A%2F%2F'
         25        FETCH_DIM_R                                      ~16     !1, 'host'
         26        CONCAT                                           ~17     ~15, ~16
         27        CONCAT                                           ~18     ~17, '%2F'
         28        CONCAT                                           ~19     ~18, !3
         29        ECHO                                                     ~19
   10    30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
182.02 ms | 1401 KiB | 21 Q