3v4l.org

run code in 300+ PHP versions simultaneously
<?php function newCode(string $uri): void { $host = parse_url($uri, PHP_URL_HOST); if ($host === false || $host === null) { echo "Could not detect any host in $uri\n"; return; } $host = strtolower(urldecode($host)); var_dump( $host, Normalizer::normalize($host, Normalizer::FORM_C), Normalizer::normalize($host, Normalizer::FORM_D), Normalizer::normalize($host, Normalizer::FORM_KC), Normalizer::normalize($host, Normalizer::FORM_KD), '--' ); } $addresses = [ 'https://⑯⑨。②⑤④。⑯⑨。②⑤④', 'https://⑯⑨。②⑤④。⑯⑨.②⑤④', ]; foreach ($addresses as $uri) { newCode($uri); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 7
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/QJdh9
function name:  (null)
number of ops:  9
compiled vars:  !0 = $addresses, !1 = $uri
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ASSIGN                                                   !0, <array>
   26     1      > FE_RESET_R                                       $3      !0, ->7
          2    > > FE_FETCH_R                                               $3, !1, ->7
   27     3    >   INIT_FCALL                                               'newcode'
          4        SEND_VAR                                                 !1
          5        DO_FCALL                                      0          
   26     6      > JMP                                                      ->2
          7    >   FE_FREE                                                  $3
   28     8      > RETURN                                                   1

Function newcode:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 16
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/QJdh9
function name:  newCode
number of ops:  52
compiled vars:  !0 = $uri, !1 = $host
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'parse_url'
          2        SEND_VAR                                                 !0
          3        SEND_VAL                                                 1
          4        DO_ICALL                                         $2      
          5        ASSIGN                                                   !1, $2
    6     6        TYPE_CHECK                                    4  ~4      !1
          7      > JMPNZ_EX                                         ~4      ~4, ->10
          8    >   TYPE_CHECK                                    2  ~5      !1
          9        BOOL                                             ~4      ~5
         10    > > JMPZ                                                     ~4, ->16
    7    11    >   ROPE_INIT                                     3  ~7      'Could+not+detect+any+host+in+'
         12        ROPE_ADD                                      1  ~7      ~7, !0
         13        ROPE_END                                      2  ~6      ~7, '%0A'
         14        ECHO                                                     ~6
    8    15      > RETURN                                                   null
   10    16    >   INIT_FCALL                                               'strtolower'
         17        INIT_FCALL                                               'urldecode'
         18        SEND_VAR                                                 !1
         19        DO_ICALL                                         $9      
         20        SEND_VAR                                                 $9
         21        DO_ICALL                                         $10     
         22        ASSIGN                                                   !1, $10
   11    23        INIT_FCALL                                               'var_dump'
   12    24        SEND_VAR                                                 !1
   13    25        INIT_STATIC_METHOD_CALL                                  'Normalizer', 'normalize'
         26        SEND_VAR_EX                                              !1
         27        FETCH_CLASS_CONSTANT                             ~12     'Normalizer', 'FORM_C'
         28        SEND_VAL_EX                                              ~12
         29        DO_FCALL                                      0  $13     
         30        SEND_VAR                                                 $13
   14    31        INIT_STATIC_METHOD_CALL                                  'Normalizer', 'normalize'
         32        SEND_VAR_EX                                              !1
         33        FETCH_CLASS_CONSTANT                             ~14     'Normalizer', 'FORM_D'
         34        SEND_VAL_EX                                              ~14
         35        DO_FCALL                                      0  $15     
         36        SEND_VAR                                                 $15
   15    37        INIT_STATIC_METHOD_CALL                                  'Normalizer', 'normalize'
         38        SEND_VAR_EX                                              !1
         39        FETCH_CLASS_CONSTANT                             ~16     'Normalizer', 'FORM_KC'
         40        SEND_VAL_EX                                              ~16
         41        DO_FCALL                                      0  $17     
         42        SEND_VAR                                                 $17
   16    43        INIT_STATIC_METHOD_CALL                                  'Normalizer', 'normalize'
         44        SEND_VAR_EX                                              !1
         45        FETCH_CLASS_CONSTANT                             ~18     'Normalizer', 'FORM_KD'
         46        SEND_VAL_EX                                              ~18
         47        DO_FCALL                                      0  $19     
         48        SEND_VAR                                                 $19
   17    49        SEND_VAL                                                 '--'
   11    50        DO_ICALL                                                 
   19    51      > RETURN                                                   null

End of function newcode

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
236.6 ms | 1021 KiB | 18 Q