3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = 'Namnet på bildtävlingen'; $string = "--My----string hello---"; $rules = <<<'RULES' :: Any-Latin; :: NFD; :: [:Nonspacing Mark:] Remove; :: NFC; :: [^-[:^Punctuation:]] Remove; :: Lower(); [:^L:] { [-] > ; [-] } [:^L:] > ; [-[:Separator:]]+ > '-'; RULES; $slug = \Transliterator::createFromRules($rules) ->transliterate( $string ); echo $slug;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FAJAW
function name:  (null)
number of ops:  12
compiled vars:  !0 = $string, !1 = $rules, !2 = $slug
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'Namnet+p%C3%A5+bildt%C3%A4vlingen'
    4     1        ASSIGN                                                       !0, '--My----string+hello---'
    6     2        ASSIGN                                                       !1, '%3A%3A+Any-Latin%3B%0A%3A%3A+NFD%3B%0A%3A%3A+%5B%3ANonspacing+Mark%3A%5D+Remove%3B%0A%3A%3A+NFC%3B%0A%3A%3A+%5B%5E-%5B%3A%5EPunctuation%3A%5D%5D+Remove%3B%0A%3A%3A+Lower%28%29%3B%0A%5B%3A%5EL%3A%5D+%7B+%5B-%5D+%3E+%3B%0A%5B-%5D+%7D+%5B%3A%5EL%3A%5D+%3E+%3B%0A%5B-%5B%3ASeparator%3A%5D%5D%2B+%3E+%27-%27%3B'
   18     3        INIT_STATIC_METHOD_CALL                                      'Transliterator', 'createFromRules'
          4        SEND_VAR_EX                                                  !1
          5        DO_FCALL                                          0  $6      
   19     6        INIT_METHOD_CALL                                             $6, 'transliterate'
          7        SEND_VAR_EX                                                  !0
          8        DO_FCALL                                          0  $7      
   18     9        ASSIGN                                                       !2, $7
   20    10        ECHO                                                         !2
   21    11      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
157.95 ms | 1911 KiB | 13 Q