3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = <<<'STR' Andrés Cortez الخوارزمی 'Namnet på bildtävlingen' "नारी शक्त"--My---string--たけだ, まさゆき STR; $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/ZTuZv
function name:  (null)
number of ops:  11
compiled vars:  !0 = $string, !1 = $rules, !2 = $slug
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'Andr%C3%A9s+Cortez+%D8%A7%D9%84%D8%AE%D9%88%D8%A7%D8%B1%D8%B2%D9%85%DB%8C+%27Namnet+p%C3%A5+bildt%C3%A4vlingen%27+%22%E0%A4%A8%E0%A4%BE%E0%A4%B0%E0%A5%80+%E0%A4%B6%E0%A4%95%E0%A5%8D%E0%A4%A4%22--My---string--%E3%81%9F%E3%81%91%E3%81%A0%2C+%E3%81%BE%E3%81%95%E3%82%86%E3%81%8D'
    7     1        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'
   19     2        INIT_STATIC_METHOD_CALL                                  'Transliterator', 'createFromRules'
          3        SEND_VAR_EX                                              !1
          4        DO_FCALL                                      0  $5      
   20     5        INIT_METHOD_CALL                                         $5, 'transliterate'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0  $6      
   19     8        ASSIGN                                                   !2, $6
   21     9        ECHO                                                     !2
   22    10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.14 ms | 1433 KiB | 13 Q