3v4l.org

run code in 500+ PHP versions simultaneously
<?php $str = 'http://yoursite.com/?site=http://exapmle.com/&site2=http://google.com/'; $parts = parse_url($str); parse_str($parts['query'], $query); $result = array(); foreach($query as $inc => $a_host) { $result[$inc]=parse_url($a_host,'PHP_URL_HOST'); } print_r($result);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 12, Position 2 = 21
Branch analysis from position: 12
2 jumps found. (Code = 78) Position 1 = 13, Position 2 = 21
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
filename:       /in/bBs96
function name:  (null)
number of ops:  26
compiled vars:  !0 = $str, !1 = $parts, !2 = $query, !3 = $result, !4 = $a_host, !5 = $inc
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   ASSIGN                                                       !0, 'http%3A%2F%2Fyoursite.com%2F%3Fsite%3Dhttp%3A%2F%2Fexapmle.com%2F%26site2%3Dhttp%3A%2F%2Fgoogle.com%2F'
    8     1        INIT_FCALL                                                   'parse_url'
          2        SEND_VAR                                                     !0
          3        DO_ICALL                                             $7      
          4        ASSIGN                                                       !1, $7
    9     5        INIT_FCALL                                                   'parse_str'
          6        FETCH_DIM_R                                          ~9      !1, 'query'
          7        SEND_VAL                                                     ~9
          8        SEND_REF                                                     !2
          9        DO_ICALL                                                     
   12    10        ASSIGN                                                       !3, <array>
   13    11      > FE_RESET_R                                           $12     !2, ->21
         12    > > FE_FETCH_R                                           ~13     $12, !4, ->21
         13    >   ASSIGN                                                       !5, ~13
   15    14        INIT_FCALL                                                   'parse_url'
         15        SEND_VAR                                                     !4
         16        SEND_VAL                                                     'PHP_URL_HOST'
         17        DO_ICALL                                             $16     
         18        ASSIGN_DIM                                                   !3, !5
         19        OP_DATA                                                      $16
   13    20      > JMP                                                          ->12
         21    >   FE_FREE                                                      $12
   18    22        INIT_FCALL                                                   'print_r'
         23        SEND_VAR                                                     !3
         24        DO_ICALL                                                     
         25      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
183.44 ms | 2783 KiB | 16 Q