3v4l.org

run code in 300+ PHP versions simultaneously
<?php $value = str_repeat('ф.', 31) . 's.s.s.s'; // "ф" is cyrillic symbol, only 38 characters, but after conversion to ASCII will be much more $result = idn_to_ascii($value, 0, INTL_IDNA_VARIANT_UTS46, $idnaInfo); var_dump($result); var_dump($idnaInfo); // $idnaInfo['errors'] should be equal to 4, it is value of IDNA_ERROR_DOMAIN_NAME_TOO_LONG
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EUSlJ
function name:  (null)
number of ops:  21
compiled vars:  !0 = $value, !1 = $result, !2 = $idnaInfo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'str_repeat'
          1        SEND_VAL                                                 '%D1%84.'
          2        SEND_VAL                                                 31
          3        DO_ICALL                                         $3      
          4        CONCAT                                           ~4      $3, 's.s.s.s'
          5        ASSIGN                                                   !0, ~4
    4     6        INIT_FCALL_BY_NAME                                       'idn_to_ascii'
          7        SEND_VAR_EX                                              !0
          8        SEND_VAL_EX                                              0
          9        FETCH_CONSTANT                                   ~6      'INTL_IDNA_VARIANT_UTS46'
         10        SEND_VAL_EX                                              ~6
         11        SEND_VAR_EX                                              !2
         12        DO_FCALL                                      0  $7      
         13        ASSIGN                                                   !1, $7
    5    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
    6    17        INIT_FCALL                                               'var_dump'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
    7    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.68 ms | 1395 KiB | 17 Q