3v4l.org

run code in 300+ PHP versions simultaneously
<?php $params = array( 'test' => 'test+test+test/+testtest=='); function url_componentize(&$v,$k){ $v = rawurlencode($k)."=".rawurlencode($v); } $params = array_walk($params,'url_componentize'); print_r($params); echo implode($params,'&amp;');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TPccm
function name:  (null)
number of ops:  15
compiled vars:  !0 = $params
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    6     1        INIT_FCALL                                               'array_walk'
          2        SEND_REF                                                 !0
          3        SEND_VAL                                                 'url_componentize'
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !0, $2
    7     6        INIT_FCALL                                               'print_r'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
    8     9        INIT_FCALL                                               'implode'
         10        SEND_VAR                                                 !0
         11        SEND_VAL                                                 '%26amp%3B'
         12        DO_ICALL                                         $5      
         13        ECHO                                                     $5
         14      > RETURN                                                   1

Function url_componentize:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TPccm
function name:  url_componentize
number of ops:  12
compiled vars:  !0 = $v, !1 = $k
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'rawurlencode'
          3        SEND_VAR                                                 !1
          4        DO_ICALL                                         $2      
          5        CONCAT                                           ~3      $2, '%3D'
          6        INIT_FCALL                                               'rawurlencode'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $4      
          9        CONCAT                                           ~5      ~3, $4
         10        ASSIGN                                                   !0, ~5
    5    11      > RETURN                                                   null

End of function url_componentize

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.55 ms | 1395 KiB | 21 Q