3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(idn_to_ascii( ".", IDNA_USE_STD3_RULES | IDNA_NONTRANSITIONAL_TO_ASCII | IDNA_CHECK_CONTEXTJ, // todo use IDNA_CHECK_BIDI ? INTL_IDNA_VARIANT_UTS46, $info )); var_dump($info); $errors = [ "IDNA_ERROR_EMPTY_LABEL", "IDNA_ERROR_LABEL_TOO_LONG", "IDNA_ERROR_DOMAIN_NAME_TOO_LONG", "IDNA_ERROR_LEADING_HYPHEN", "IDNA_ERROR_TRAILING_HYPHEN", "IDNA_ERROR_HYPHEN_3_4", "IDNA_ERROR_LEADING_COMBINING_MARK", "IDNA_ERROR_DISALLOWED", "IDNA_ERROR_PUNYCODE", "IDNA_ERROR_LABEL_HAS_DOT", "IDNA_ERROR_INVALID_ACE_LABEL", "IDNA_ERROR_BIDI", "IDNA_ERROR_CONTEXTJ" ]; foreach($errors as $errorReadable){ $error = constant($errorReadable); if($info['errors'] & $error){ echo $errorReadable . "\n"; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 20, Position 2 = 31
Branch analysis from position: 20
2 jumps found. (Code = 78) Position 1 = 21, Position 2 = 31
Branch analysis from position: 21
2 jumps found. (Code = 43) Position 1 = 28, Position 2 = 30
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 30
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 31
filename:       /in/F1ZgO
function name:  (null)
number of ops:  33
compiled vars:  !0 = $info, !1 = $errors, !2 = $errorReadable, !3 = $error
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL_BY_NAME                                       'idn_to_ascii'
    4     2        SEND_VAL_EX                                              '.'
    5     3        FETCH_CONSTANT                                   ~4      'IDNA_USE_STD3_RULES'
          4        FETCH_CONSTANT                                   ~5      'IDNA_NONTRANSITIONAL_TO_ASCII'
          5        BW_OR                                            ~6      ~4, ~5
          6        FETCH_CONSTANT                                   ~7      'IDNA_CHECK_CONTEXTJ'
          7        BW_OR                                            ~8      ~6, ~7
          8        SEND_VAL_EX                                              ~8
    6     9        FETCH_CONSTANT                                   ~9      'INTL_IDNA_VARIANT_UTS46'
         10        SEND_VAL_EX                                              ~9
    4    11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0  $10     
         13        SEND_VAR                                                 $10
         14        DO_ICALL                                                 
   10    15        INIT_FCALL                                               'var_dump'
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                                 
   12    18        ASSIGN                                                   !1, <array>
   29    19      > FE_RESET_R                                       $14     !1, ->31
         20    > > FE_FETCH_R                                               $14, !2, ->31
   30    21    >   INIT_FCALL                                               'constant'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                         $15     
         24        ASSIGN                                                   !3, $15
   31    25        FETCH_DIM_R                                      ~17     !0, 'errors'
         26        BW_AND                                           ~18     !3, ~17
         27      > JMPZ                                                     ~18, ->30
   32    28    >   CONCAT                                           ~19     !2, '%0A'
         29        ECHO                                                     ~19
   29    30    > > JMP                                                      ->20
         31    >   FE_FREE                                                  $14
   34    32      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.09 ms | 1396 KiB | 20 Q