3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = "foo.lol?a=b&f=g?c=d"; $split = preg_split("/\?/", $url); unset($split[0]); var_dump(implode("?", $split)); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3PmCi
function name:  (null)
number of ops:  15
compiled vars:  !0 = $url, !1 = $split
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'foo.lol%3Fa%3Db%26f%3Dg%3Fc%3Dd'
    3     1        INIT_FCALL                                               'preg_split'
          2        SEND_VAL                                                 '%2F%5C%3F%2F'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $3      
          5        ASSIGN                                                   !1, $3
    4     6        UNSET_DIM                                                !1, 0
    5     7        INIT_FCALL                                               'var_dump'
          8        INIT_FCALL                                               'implode'
          9        SEND_VAL                                                 '%3F'
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
    6    14      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.57 ms | 1385 KiB | 19 Q