3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'https://www.youtube.com/embed/ROipDjNYK4k?rel=#rel=mangledFragment'; $url_arr = parse_url($url); $query = $url_arr['query']; print $url = str_replace(array($query,'?'), '', $url);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ERr4V
function name:  (null)
number of ops:  17
compiled vars:  !0 = $url, !1 = $url_arr, !2 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'https%3A%2F%2Fwww.youtube.com%2Fembed%2FROipDjNYK4k%3Frel%3D%23rel%3DmangledFragment'
    5     1        INIT_FCALL                                               'parse_url'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $4      
          4        ASSIGN                                                   !1, $4
    6     5        FETCH_DIM_R                                      ~6      !1, 'query'
          6        ASSIGN                                                   !2, ~6
    7     7        INIT_FCALL                                               'str_replace'
          8        INIT_ARRAY                                       ~8      !2
          9        ADD_ARRAY_ELEMENT                                ~8      '%3F'
         10        SEND_VAL                                                 ~8
         11        SEND_VAL                                                 ''
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $9      
         14        ASSIGN                                           ~10     !0, $9
         15        ECHO                                                     ~10
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
128.04 ms | 1399 KiB | 17 Q