3v4l.org

run code in 300+ PHP versions simultaneously
<?php function slugify($string) { $string = transliterator_transliterate("Any-Latin; NFD; [:Nonspacing Mark:] Remove; NFC; [:Punctuation:] Remove; Lower();", $string); $string = preg_replace('/[-\s]+/', '-', $string); return trim($string, '-'); } echo slugify("Я люблю PHP!"); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NLK2M
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'slugify'
          1        SEND_VAL                                                 '%D0%AF+%D0%BB%D1%8E%D0%B1%D0%BB%D1%8E+PHP%21'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
    9     4      > RETURN                                                   1

Function slugify:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NLK2M
function name:  slugify
number of ops:  18
compiled vars:  !0 = $string
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL_BY_NAME                                       'transliterator_transliterate'
          2        SEND_VAL_EX                                              'Any-Latin%3B+NFD%3B+%5B%3ANonspacing+Mark%3A%5D+Remove%3B+NFC%3B+%5B%3APunctuation%3A%5D+Remove%3B+Lower%28%29%3B'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $1      
          5        ASSIGN                                                   !0, $1
    4     6        INIT_FCALL                                               'preg_replace'
          7        SEND_VAL                                                 '%2F%5B-%5Cs%5D%2B%2F'
          8        SEND_VAL                                                 '-'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $3      
         11        ASSIGN                                                   !0, $3
    5    12        INIT_FCALL                                               'trim'
         13        SEND_VAR                                                 !0
         14        SEND_VAL                                                 '-'
         15        DO_ICALL                                         $5      
         16      > RETURN                                                   $5
    6    17*     > RETURN                                                   null

End of function slugify

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.74 ms | 1397 KiB | 18 Q