3v4l.org

run code in 300+ PHP versions simultaneously
<?php function decodeText($texts) { if(is_array($texts)) { $encoded = array(); foreach($texts as $key => $text) { if (!is_array($text )) { $encoded[$key] = utf8_decode($text); } else { $this->decodeText($text); } } } else { $encoded = utf8_decode($text); } 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/5DcHY
function name:  (null)
number of ops:  15
compiled vars:  !0 = $smth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   ASSIGN                                                   !0, <array>
   28     1        INIT_FCALL                                               'decodetext'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !0, $2
   29     5        INIT_FCALL                                               'var_dump'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                                 
   30     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 = 23
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 21
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 21
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 27
Branch analysis from position: 27
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 21
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5DcHY
function name:  decodeText
number of ops:  29
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, ->23
    7     3    >   ASSIGN                                                   !1, <array>
    8     4      > FE_RESET_R                                       $6      !0, ->21
          5    > > FE_FETCH_R                                       ~7      $6, !2, ->21
          6    >   ASSIGN                                                   !3, ~7
   10     7        TYPE_CHECK                                  128  ~9      !2
          8        BOOL_NOT                                         ~10     ~9
          9      > JMPZ                                                     ~10, ->16
   12    10    >   INIT_FCALL                                               'utf8_decode'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $12     
         13        ASSIGN_DIM                                               !1, !3
         14        OP_DATA                                                  $12
         15      > JMP                                                      ->20
   16    16    >   FETCH_THIS                                       $13     
         17        INIT_METHOD_CALL                                         $13, 'decodeText'
         18        SEND_VAR_EX                                              !2
         19        DO_FCALL                                      0          
    8    20    > > JMP                                                      ->5
         21    >   FE_FREE                                                  $6
         22      > JMP                                                      ->27
   22    23    >   INIT_FCALL                                               'utf8_decode'
         24        SEND_VAR                                                 !2
         25        DO_ICALL                                         $15     
         26        ASSIGN                                                   !1, $15
   24    27    > > RETURN                                                   !1
   25    28*     > RETURN                                                   null

End of function decodetext

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.44 ms | 1394 KiB | 19 Q