3v4l.org

run code in 300+ PHP versions simultaneously
<?php function zmien_znaki_na_liczbe($znaki) { $znaki_na_liczby = array( 'aąĄ' => 1, 'b' => 2, 'cćĆ' => 3, 'd' => 4, 'eęĘ' => 5, 'f' => 6, 'g' => 7, 'h' => 8, 'i' => 9, 'j' => 10, 'k' => 11, 'lłŁ' => 12, 'm' => 13, 'nńŃ' => 14, 'oóÓ' => 15, 'p' => 16, 'r' => 17, 'sśŚ' => 18, 't' => 19, 'u' => 20, 'w' => 21, 'y' => 22, 'zżźŻŹ' => 23, 'x' => 24, 'q' => 25, 'v' => 26, ); $znaki = mb_strtolower($znaki); foreach($znaki_na_liczby as $litery => $liczba) { $znaki = str_ireplace(str_split($litery), $liczba, $znaki); } return $znaki; } echo zmien_znaki_na_liczbe('ąęłóżź');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/6oYmC
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   INIT_FCALL                                               'zmien_znaki_na_liczbe'
          1        SEND_VAL                                                 '%C4%85%C4%99%C5%82%C3%B3%C5%BC%C5%BA'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function zmien_znaki_na_liczbe:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 19
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 19
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/6oYmC
function name:  zmien_znaki_na_liczbe
number of ops:  22
compiled vars:  !0 = $znaki, !1 = $znaki_na_liczby, !2 = $liczba, !3 = $litery
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, <array>
   32     2        INIT_FCALL                                               'mb_strtolower'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $5      
          5        ASSIGN                                                   !0, $5
   33     6      > FE_RESET_R                                       $7      !1, ->19
          7    > > FE_FETCH_R                                       ~8      $7, !2, ->19
          8    >   ASSIGN                                                   !3, ~8
   34     9        INIT_FCALL                                               'str_ireplace'
         10        INIT_FCALL                                               'str_split'
         11        SEND_VAR                                                 !3
         12        DO_ICALL                                         $10     
         13        SEND_VAR                                                 $10
         14        SEND_VAR                                                 !2
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                         $11     
         17        ASSIGN                                                   !0, $11
   33    18      > JMP                                                      ->7
         19    >   FE_FREE                                                  $7
   36    20      > RETURN                                                   !0
   37    21*     > RETURN                                                   null

End of function zmien_znaki_na_liczbe

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.79 ms | 1403 KiB | 20 Q