3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * http://domain.com/?referal=athimmo * * Return only the broker image from the referal. * @return string */ function ldl_generate_referal_page() { $url = "//" . "foobar.com" . "/barfoo"; $parts = parse_url($url); parse_str($parts['query'], $query); if(!empty($query)) { $broker = $query['referal']; switch ($broker) { case 'dewaele'; var_dump($broker); break; case 'urbis'; var_dump($broker); break; default: var_dump($broker); } } } ldl_generate_referal_page();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vrSZQ
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   37     0  E >   INIT_FCALL                                               'ldl_generate_referal_page'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function ldl_generate_referal_page:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 32
Branch analysis from position: 13
4 jumps found. (Code = 188) Position 1 = 21, Position 2 = 25, Position 3 = 29, Position 4 = 16
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 32
Branch analysis from position: 32
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 21
Branch analysis from position: 18
2 jumps found. (Code = 44) Position 1 = 20, Position 2 = 25
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 25
Branch analysis from position: 21
Branch analysis from position: 32
filename:       /in/vrSZQ
function name:  ldl_generate_referal_page
number of ops:  33
compiled vars:  !0 = $url, !1 = $parts, !2 = $query, !3 = $broker
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   ASSIGN                                                   !0, '%2F%2Ffoobar.com%2Fbarfoo'
   14     1        INIT_FCALL                                               'parse_url'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
   16     5        INIT_FCALL                                               'parse_str'
          6        FETCH_DIM_R                                      ~7      !1, 'query'
          7        SEND_VAL                                                 ~7
          8        SEND_REF                                                 !2
          9        DO_ICALL                                                 
   18    10        ISSET_ISEMPTY_CV                                 ~9      !2
         11        BOOL_NOT                                         ~10     ~9
         12      > JMPZ                                                     ~10, ->32
   19    13    >   FETCH_DIM_R                                      ~11     !2, 'referal'
         14        ASSIGN                                                   !3, ~11
   21    15      > SWITCH_STRING                                            !3, [ 'dewaele':->21, 'urbis':->25, ], ->29
   22    16    >   IS_EQUAL                                                 !3, 'dewaele'
         17      > JMPNZ                                                    ~13, ->21
   26    18    >   IS_EQUAL                                                 !3, 'urbis'
         19      > JMPNZ                                                    ~13, ->25
         20    > > JMP                                                      ->29
   23    21    >   INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !3
         23        DO_ICALL                                                 
   24    24      > JMP                                                      ->32
   27    25    >   INIT_FCALL                                               'var_dump'
         26        SEND_VAR                                                 !3
         27        DO_ICALL                                                 
   28    28      > JMP                                                      ->32
   31    29    >   INIT_FCALL                                               'var_dump'
         30        SEND_VAR                                                 !3
         31        DO_ICALL                                                 
   35    32    > > RETURN                                                   null

End of function ldl_generate_referal_page

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.76 ms | 1403 KiB | 20 Q