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, ); 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/uXldM
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     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 = 3, Position 2 = 15
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 15
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 15
filename:       /in/uXldM
function name:  zmien_znaki_na_liczbe
number of ops:  18
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      > FE_RESET_R                                       $5      !1, ->15
          3    > > FE_FETCH_R                                       ~6      $5, !2, ->15
          4    >   ASSIGN                                                   !3, ~6
   33     5        INIT_FCALL                                               'str_ireplace'
          6        INIT_FCALL                                               'str_split'
          7        SEND_VAR                                                 !3
          8        DO_ICALL                                         $8      
          9        SEND_VAR                                                 $8
         10        SEND_VAR                                                 !2
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $9      
         13        ASSIGN                                                   !0, $9
   32    14      > JMP                                                      ->3
         15    >   FE_FREE                                                  $5
   35    16      > RETURN                                                   !0
   36    17*     > RETURN                                                   null

End of function zmien_znaki_na_liczbe

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.99 ms | 1399 KiB | 18 Q