3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = parse_url('http://www.example.com/путин/'); $url['path'] = str_replace('/','',$url['path']); $url['path'] = urlencode($url['path']); var_dump($url); echo $url['scheme'] . '://' . $url['host'] . '/' . $url['path'];
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iMTsf
function name:  (null)
number of ops:  30
compiled vars:  !0 = $url
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'parse_url'
          1        SEND_VAL                                                 'http%3A%2F%2Fwww.example.com%2F%D0%BF%D1%83%D1%82%D0%B8%D0%BD%2F'
          2        DO_ICALL                                         $1      
          3        ASSIGN                                                   !0, $1
    3     4        INIT_FCALL                                               'str_replace'
          5        SEND_VAL                                                 '%2F'
          6        SEND_VAL                                                 ''
          7        FETCH_DIM_R                                      ~4      !0, 'path'
          8        SEND_VAL                                                 ~4
          9        DO_ICALL                                         $5      
         10        ASSIGN_DIM                                               !0, 'path'
         11        OP_DATA                                                  $5
    4    12        INIT_FCALL                                               'urlencode'
         13        FETCH_DIM_R                                      ~7      !0, 'path'
         14        SEND_VAL                                                 ~7
         15        DO_ICALL                                         $8      
         16        ASSIGN_DIM                                               !0, 'path'
         17        OP_DATA                                                  $8
    5    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
    7    21        FETCH_DIM_R                                      ~10     !0, 'scheme'
         22        CONCAT                                           ~11     ~10, '%3A%2F%2F'
         23        FETCH_DIM_R                                      ~12     !0, 'host'
         24        CONCAT                                           ~13     ~11, ~12
         25        CONCAT                                           ~14     ~13, '%2F'
         26        FETCH_DIM_R                                      ~15     !0, 'path'
         27        CONCAT                                           ~16     ~14, ~15
         28        ECHO                                                     ~16
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.88 ms | 1395 KiB | 21 Q