3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = 'http://mysite.com/hello/world?look_at=me'; $query = parse_str(parse_url($url, PHP_URL_QUERY)); ?> <a href="?<?= http_build_query(array_merge($query, ['category' => 'val'])) ?>">Категория каталога</a> <a href="?<?= http_build_query(array_merge($query, ['sort' => 'price'])) ?>">Сортировать по цене</a>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EU8vn
function name:  (null)
number of ops:  29
compiled vars:  !0 = $url, !1 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'http%3A%2F%2Fmysite.com%2Fhello%2Fworld%3Flook_at%3Dme'
    3     1        INIT_FCALL                                               'parse_str'
          2        INIT_FCALL                                               'parse_url'
          3        SEND_VAR                                                 !0
          4        SEND_VAL                                                 6
          5        DO_ICALL                                         $3      
          6        SEND_VAR                                                 $3
          7        DO_ICALL                                         $4      
          8        ASSIGN                                                   !1, $4
    5     9        ECHO                                                     '%3Ca+href%3D%22%3F'
         10        INIT_FCALL                                               'http_build_query'
         11        INIT_FCALL                                               'array_merge'
         12        SEND_VAR                                                 !1
         13        SEND_VAL                                                 <array>
         14        DO_ICALL                                         $6      
         15        SEND_VAR                                                 $6
         16        DO_ICALL                                         $7      
         17        ECHO                                                     $7
         18        ECHO                                                     '%22%3E%D0%9A%D0%B0%D1%82%D0%B5%D0%B3%D0%BE%D1%80%D0%B8%D1%8F+%D0%BA%D0%B0%D1%82%D0%B0%D0%BB%D0%BE%D0%B3%D0%B0%3C%2Fa%3E%0A%3Ca+href%3D%22%3F'
    6    19        INIT_FCALL                                               'http_build_query'
         20        INIT_FCALL                                               'array_merge'
         21        SEND_VAR                                                 !1
         22        SEND_VAL                                                 <array>
         23        DO_ICALL                                         $8      
         24        SEND_VAR                                                 $8
         25        DO_ICALL                                         $9      
         26        ECHO                                                     $9
         27        ECHO                                                     '%22%3E%D0%A1%D0%BE%D1%80%D1%82%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D1%82%D1%8C+%D0%BF%D0%BE+%D1%86%D0%B5%D0%BD%D0%B5%3C%2Fa%3E'
         28      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
162.11 ms | 1396 KiB | 21 Q