3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ "http://sumiyoshi22.jp/", "https://www.finecity138.jp/", "http://www.hirakata-p.jp/", "http://www.honki-pj.com/", "http://nishitetsu-sumai.com/centermarkstower/index.html", "http://senri100.jp/index.html" ]; foreach ($array as $url) { $parts = parse_url($url); $scheme = $parts["scheme"]; $host = $parts["host"]; $path = dirname($parts["path"]) ?? ''; if (in_array($host, ["www.finecity138.jp", "nishitetsu-sumai.com"])) { $path .= ($path == "/" ? "" : "/") . "outline.html"; } else { $path .= "outline"; } $output[] = "{$scheme}://{$host}{$path}"; } var_export($output);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 36
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 36
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 20, Position 2 = 28
Branch analysis from position: 20
2 jumps found. (Code = 43) Position 1 = 22, Position 2 = 24
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 25
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 36
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 36
filename:       /in/dMNau
function name:  (null)
number of ops:  41
compiled vars:  !0 = $array, !1 = $url, !2 = $parts, !3 = $scheme, !4 = $host, !5 = $path, !6 = $output
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   11     1      > FE_RESET_R                                       $8      !0, ->36
          2    > > FE_FETCH_R                                               $8, !1, ->36
   12     3    >   INIT_FCALL                                               'parse_url'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $9      
          6        ASSIGN                                                   !2, $9
   13     7        FETCH_DIM_R                                      ~11     !2, 'scheme'
          8        ASSIGN                                                   !3, ~11
   14     9        FETCH_DIM_R                                      ~13     !2, 'host'
         10        ASSIGN                                                   !4, ~13
   15    11        INIT_FCALL                                               'dirname'
         12        FETCH_DIM_R                                      ~15     !2, 'path'
         13        SEND_VAL                                                 ~15
         14        DO_ICALL                                         $16     
         15        COALESCE                                         ~17     $16
         16        QM_ASSIGN                                        ~17     ''
         17        ASSIGN                                                   !5, ~17
   16    18        IN_ARRAY                                                 !4, <array>
         19      > JMPZ                                                     ~19, ->28
   17    20    >   IS_EQUAL                                                 !5, '%2F'
         21      > JMPZ                                                     ~20, ->24
         22    >   QM_ASSIGN                                        ~21     ''
         23      > JMP                                                      ->25
         24    >   QM_ASSIGN                                        ~21     '%2F'
         25    >   CONCAT                                           ~22     ~21, 'outline.html'
         26        ASSIGN_OP                                     8          !5, ~22
   16    27      > JMP                                                      ->29
   19    28    >   ASSIGN_OP                                     8          !5, 'outline'
   21    29    >   ROPE_INIT                                     4  ~27     !3
         30        ROPE_ADD                                      1  ~27     ~27, '%3A%2F%2F'
         31        ROPE_ADD                                      2  ~27     ~27, !4
         32        ROPE_END                                      3  ~26     ~27, !5
         33        ASSIGN_DIM                                               !6
         34        OP_DATA                                                  ~26
   11    35      > JMP                                                      ->2
         36    >   FE_FREE                                                  $8
   23    37        INIT_FCALL                                               'var_export'
         38        SEND_VAR                                                 !6
         39        DO_ICALL                                                 
         40      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.26 ms | 1017 KiB | 16 Q