3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = '=?UTF-8?Q?=c3=b8en?='; echo "$input\n"; $output = ''; foreach(imap_mime_header_decode($input) as $element){ if($element->charset == 'utf-8'){ echo "utf8 = $element->text\n"; $output .= $element->text; } else{ echo "default = $element->text\n"; $output .= $element->text; } } $string = preg_replace('/[^a-zæøåA-ZÆØÅ0-9 \-\.,:]/', '', $output); echo "$string\n"; echo strlen($string);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 29
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 29
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 21
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/AXAdo
function name:  (null)
number of ops:  42
compiled vars:  !0 = $input, !1 = $output, !2 = $element, !3 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '%3D%3FUTF-8%3FQ%3F%3Dc3%3Db8en%3F%3D'
    3     1        NOP                                                      
          2        FAST_CONCAT                                      ~5      !0, '%0A'
          3        ECHO                                                     ~5
    4     4        ASSIGN                                                   !1, ''
    5     5        INIT_FCALL_BY_NAME                                       'imap_mime_header_decode'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $7      
          8      > FE_RESET_R                                       $8      $7, ->29
          9    > > FE_FETCH_R                                               $8, !2, ->29
    6    10    >   FETCH_OBJ_R                                      ~9      !2, 'charset'
         11        IS_EQUAL                                                 ~9, 'utf-8'
         12      > JMPZ                                                     ~10, ->21
    7    13    >   ROPE_INIT                                     3  ~13     'utf8+%3D+'
         14        FETCH_OBJ_R                                      ~11     !2, 'text'
         15        ROPE_ADD                                      1  ~13     ~13, ~11
         16        ROPE_END                                      2  ~12     ~13, '%0A'
         17        ECHO                                                     ~12
    8    18        FETCH_OBJ_R                                      ~15     !2, 'text'
         19        ASSIGN_OP                                     8          !1, ~15
         20      > JMP                                                      ->28
   11    21    >   ROPE_INIT                                     3  ~19     'default+%3D+'
         22        FETCH_OBJ_R                                      ~17     !2, 'text'
         23        ROPE_ADD                                      1  ~19     ~19, ~17
         24        ROPE_END                                      2  ~18     ~19, '%0A'
         25        ECHO                                                     ~18
   12    26        FETCH_OBJ_R                                      ~21     !2, 'text'
         27        ASSIGN_OP                                     8          !1, ~21
    5    28    > > JMP                                                      ->9
         29    >   FE_FREE                                                  $8
   15    30        INIT_FCALL                                               'preg_replace'
         31        SEND_VAL                                                 '%2F%5B%5Ea-z%C3%A6%C3%B8%C3%A5A-Z%C3%86%C3%98%C3%850-9+%5C-%5C.%2C%3A%5D%2F'
         32        SEND_VAL                                                 ''
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                         $23     
         35        ASSIGN                                                   !3, $23
   16    36        NOP                                                      
         37        FAST_CONCAT                                      ~25     !3, '%0A'
         38        ECHO                                                     ~25
   17    39        STRLEN                                           ~26     !3
         40        ECHO                                                     ~26
         41      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.51 ms | 1400 KiB | 15 Q