3v4l.org

run code in 300+ PHP versions simultaneously
<?php $foo = 'http://google.ru/foo/bar/?baz=goo#ololo'; $foo = preg_replace('~^https?://~', '', $foo); $foo = preg_replace('~/*[?#].*$~', '', $foo); var_dump($foo);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/eHWuj
function name:  (null)
number of ops:  17
compiled vars:  !0 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fgoogle.ru%2Ffoo%2Fbar%2F%3Fbaz%3Dgoo%23ololo'
    4     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%7E%5Ehttps%3F%3A%2F%2F%7E'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    5     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%7E%2F%2A%5B%3F%23%5D.%2A%24%7E'
          9        SEND_VAL                                                 ''
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $4      
         12        ASSIGN                                                   !0, $4
    6    13        INIT_FCALL                                               'var_dump'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.67 ms | 1399 KiB | 17 Q