3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ 'Арг.ен!тина ма,нит нег$ра', 'S!um summ$us mu,s', 'Арг.ен!тина ма,нит нег$ра'.'S!um summ$us mu,s', ]; foreach($strings as $string) { $string = mb_strtolower($string); $preparedString = preg_replace('/[^\p{Cyrillic}\p{Latin}]/u', '', $string); echo $string.' -> '.$preparedString."\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 18
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 18
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
filename:       /in/govdO
function name:  (null)
number of ops:  20
compiled vars:  !0 = $strings, !1 = $string, !2 = $preparedString
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1      > FE_RESET_R                                       $4      !0, ->18
          2    > > FE_FETCH_R                                               $4, !1, ->18
   10     3    >   INIT_FCALL                                               'mb_strtolower'
          4        SEND_VAR                                                 !1
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
   11     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%2F%5B%5E%5Cp%7BCyrillic%7D%5Cp%7BLatin%7D%5D%2Fu'
          9        SEND_VAL                                                 ''
         10        SEND_VAR                                                 !1
         11        DO_ICALL                                         $7      
         12        ASSIGN                                                   !2, $7
   13    13        CONCAT                                           ~9      !1, '+-%3E+'
         14        CONCAT                                           ~10     ~9, !2
         15        CONCAT                                           ~11     ~10, '%0A'
         16        ECHO                                                     ~11
    8    17      > JMP                                                      ->2
         18    >   FE_FREE                                                  $4
   14    19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.15 ms | 998 KiB | 15 Q