3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decodeText($texts) { if(is_array($texts)) { $encoded = array(); foreach($texts as $key => $text) { var_dump(is_array($key)); var_dump(is_array($text)); if (!is_array($text)) { $encoded[$key] = utf8_decode($text); } else { decodeText($text); } } } else { $encoded = utf8_decode($texts); } return $encoded; } $smth = array('test' => 'ääõölö', 'test2' => array('öüõü', 'dasd212äöäöä' )); $smth = decodeText($smth); var_dump($smth); var_dump(decodeText('köõöõüpõ'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UDeOd
function name:  (null)
number of ops:  15
compiled vars:  !0 = $smth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   ASSIGN                                                   !0, <array>
   30     1        INIT_FCALL                                               'decodetext'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !0, $2
   31     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   32     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'decodetext'
         10        SEND_VAL                                                 'k%C3%B6%C3%B5%C3%B6%C3%B5%C3%BCp%C3%B5'
         11        DO_FCALL                                      0  $5      
         12        SEND_VAR                                                 $5
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

Function decodetext:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 30
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 28
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 28
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 24
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 24
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 28
Branch analysis from position: 30
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UDeOd
function name:  decodeText
number of ops:  36
compiled vars:  !0 = $texts, !1 = $encoded, !2 = $text, !3 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        TYPE_CHECK                                  128          !0
          2      > JMPZ                                                     ~4, ->30
    7     3    >   ASSIGN                                                   !1, <array>
    8     4      > FE_RESET_R                                       $6      !0, ->28
          5    > > FE_FETCH_R                                       ~7      $6, !2, ->28
          6    >   ASSIGN                                                   !3, ~7
   10     7        INIT_FCALL                                               'var_dump'
          8        TYPE_CHECK                                  128  ~9      !3
          9        SEND_VAL                                                 ~9
         10        DO_ICALL                                                 
   11    11        INIT_FCALL                                               'var_dump'
         12        TYPE_CHECK                                  128  ~11     !2
         13        SEND_VAL                                                 ~11
         14        DO_ICALL                                                 
   12    15        TYPE_CHECK                                  128  ~13     !2
         16        BOOL_NOT                                         ~14     ~13
         17      > JMPZ                                                     ~14, ->24
   14    18    >   INIT_FCALL                                               'utf8_decode'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $16     
         21        ASSIGN_DIM                                               !1, !3
         22        OP_DATA                                                  $16
         23      > JMP                                                      ->27
   18    24    >   INIT_FCALL_BY_NAME                                       'decodeText'
         25        SEND_VAR_EX                                              !2
         26        DO_FCALL                                      0          
    8    27    > > JMP                                                      ->5
         28    >   FE_FREE                                                  $6
         29      > JMP                                                      ->34
   24    30    >   INIT_FCALL                                               'utf8_decode'
         31        SEND_VAR                                                 !0
         32        DO_ICALL                                         $18     
         33        ASSIGN                                                   !1, $18
   26    34    > > RETURN                                                   !1
   27    35*     > RETURN                                                   null

End of function decodetext

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.12 ms | 1403 KiB | 19 Q