3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url = "https://m.naughtyappetite.com/oth.php?dynamicpage=all_1cm_universal_light_n&ver=1"; $urlParams = array( 'source', 'transfer_to', 'ban_rm', 'pop_rm', 'txt_rm', 'zoneid', 'userid', 'userId', 'ver', 't_uod', 't_umbr', 'email', 'emlTrack', 'key', 'uniqmessageId', 'open', 'transferSource', 'cmpn', 'loc', 'cross', 'crossMask', '_cbUrl', '_disAL', '_fData', 'utm_partner', 'clkid', 'clid', 'clbid', 'safeLP', 'campaigntype', 'redirectUrl', ); function getParam($key) { $url = "http://www.thirst-more.com/2207/campaign32813?safeLP=naughty&source=www.benaughty.com&transfer_to=naughtyappetite.com&ban_rm=000748865&zoneid=4661&userId=c078c5c84f7311e79a97441ea14ed80c&key=c7eee25af7c437abaf37c460b8d1f467&clid=927&clbid=33872&location=UKR&remType=Banner&targetSite=6747c8fb5b73abce100992b51af15eef"; $query = parse_url($url, PHP_URL_QUERY); parse_str($query, $params); return isset($params[$key]) ? $params[$key] : null; } $params = array_fill_keys($urlParams, ""); array_walk($params, function(&$item, $key){ $item = self::getParam($key); }); $params = array_filter($params); die(var_dump($params));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/hZttH
function name:  (null)
number of ops:  21
compiled vars:  !0 = $url, !1 = $urlParams, !2 = $params
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'https%3A%2F%2Fm.naughtyappetite.com%2Foth.php%3Fdynamicpage%3Dall_1cm_universal_light_n%26ver%3D1'
    3     1        ASSIGN                                                   !1, <array>
   44     2        INIT_FCALL                                               'array_fill_keys'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 ''
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
   45     7        INIT_FCALL                                               'array_walk'
          8        SEND_REF                                                 !2
          9        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FhZttH%3A45%240'
   47    10        SEND_VAL                                                 ~7
         11        DO_ICALL                                                 
   48    12        INIT_FCALL                                               'array_filter'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $9      
         15        ASSIGN                                                   !2, $9
   49    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !2
         18        DO_ICALL                                         $11     
         19      > EXIT                                                     $11
         20*     > RETURN                                                   1

Function getparam:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 16
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hZttH
function name:  getParam
number of ops:  19
compiled vars:  !0 = $key, !1 = $url, !2 = $query, !3 = $params
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   37     0  E >   RECV                                             !0      
   38     1        ASSIGN                                                   !1, 'http%3A%2F%2Fwww.thirst-more.com%2F2207%2Fcampaign32813%3FsafeLP%3Dnaughty%26source%3Dwww.benaughty.com%26transfer_to%3Dnaughtyappetite.com%26ban_rm%3D000748865%26zoneid%3D4661%26userId%3Dc078c5c84f7311e79a97441ea14ed80c%26key%3Dc7eee25af7c437abaf37c460b8d1f467%26clid%3D927%26clbid%3D33872%26location%3DUKR%26remType%3DBanner%26targetSite%3D6747c8fb5b73abce100992b51af15eef'
   39     2        INIT_FCALL                                               'parse_url'
          3        SEND_VAR                                                 !1
          4        SEND_VAL                                                 6
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !2, $5
   40     7        INIT_FCALL                                               'parse_str'
          8        SEND_VAR                                                 !2
          9        SEND_REF                                                 !3
         10        DO_ICALL                                                 
   41    11        ISSET_ISEMPTY_DIM_OBJ                         0          !3, !0
         12      > JMPZ                                                     ~8, ->16
         13    >   FETCH_DIM_R                                      ~9      !3, !0
         14        QM_ASSIGN                                        ~10     ~9
         15      > JMP                                                      ->17
         16    >   QM_ASSIGN                                        ~10     null
         17    > > RETURN                                                   ~10
   42    18*     > RETURN                                                   null

End of function getparam

Function %00%7Bclosure%7D%2Fin%2FhZttH%3A45%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hZttH
function name:  {closure}
number of ops:  7
compiled vars:  !0 = $item, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   46     2        INIT_STATIC_METHOD_CALL                                  'getParam'
          3        SEND_VAR_EX                                              !1
          4        DO_FCALL                                      0  $2      
          5        ASSIGN                                                   !0, $2
   47     6      > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FhZttH%3A45%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.7 ms | 1400 KiB | 25 Q