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($texts[$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/LFpke
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 = 31
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 29
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 29
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 25
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 28
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 25
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
Branch analysis from position: 31
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LFpke
function name:  decodeText
number of ops:  37
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, ->31
    7     3    >   ASSIGN                                                   !1, <array>
    8     4      > FE_RESET_R                                       $6      !0, ->29
          5    > > FE_FETCH_R                                       ~7      $6, !2, ->29
          6    >   ASSIGN                                                   !3, ~7
   10     7        INIT_FCALL                                               'var_dump'
          8        FETCH_DIM_R                                      ~9      !0, !3
          9        TYPE_CHECK                                  128  ~10     ~9
         10        SEND_VAL                                                 ~10
         11        DO_ICALL                                                 
   11    12        INIT_FCALL                                               'var_dump'
         13        TYPE_CHECK                                  128  ~12     !2
         14        SEND_VAL                                                 ~12
         15        DO_ICALL                                                 
   12    16        TYPE_CHECK                                  128  ~14     !2
         17        BOOL_NOT                                         ~15     ~14
         18      > JMPZ                                                     ~15, ->25
   14    19    >   INIT_FCALL                                               'utf8_decode'
         20        SEND_VAR                                                 !2
         21        DO_ICALL                                         $17     
         22        ASSIGN_DIM                                               !1, !3
         23        OP_DATA                                                  $17
         24      > JMP                                                      ->28
   18    25    >   INIT_FCALL_BY_NAME                                       'decodeText'
         26        SEND_VAR_EX                                              !2
         27        DO_FCALL                                      0          
    8    28    > > JMP                                                      ->5
         29    >   FE_FREE                                                  $6
         30      > JMP                                                      ->35
   24    31    >   INIT_FCALL                                               'utf8_decode'
         32        SEND_VAR                                                 !0
         33        DO_ICALL                                         $19     
         34        ASSIGN                                                   !1, $19
   26    35    > > RETURN                                                   !1
   27    36*     > RETURN                                                   null

End of function decodetext

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.83 ms | 1394 KiB | 19 Q