3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "dulsão vafan"; $separator = '_'; $text = preg_replace('/[^\\pL\d]+/u', $separator, $text); if(function_exists('iconv')){ setlocale(LC_CTYPE, 'fr_FR.UTF-8'); $text = iconv('UTF-8','ASCII//TRANSLIT//IGNORE',$text); } $text = strtolower($text); $text = preg_replace('/[^-\w]+/', $separator, $text); $text = trim($text, '-_ '); echo $text;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 22
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 22
filename:       /in/QqisK
function name:  (null)
number of ops:  39
compiled vars:  !0 = $text, !1 = $separator
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 'duls%C3%A3o+vafan'
    3     1        ASSIGN                                                   !1, '_'
    4     2        INIT_FCALL                                               'preg_replace'
          3        SEND_VAL                                                 '%2F%5B%5E%5CpL%5Cd%5D%2B%2Fu'
          4        SEND_VAR                                                 !1
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $4      
          7        ASSIGN                                                   !0, $4
    6     8        INIT_FCALL                                               'function_exists'
          9        SEND_VAL                                                 'iconv'
         10        DO_ICALL                                         $6      
         11      > JMPZ                                                     $6, ->22
    7    12    >   INIT_FCALL                                               'setlocale'
         13        SEND_VAL                                                 0
         14        SEND_VAL                                                 'fr_FR.UTF-8'
         15        DO_ICALL                                                 
    8    16        INIT_FCALL_BY_NAME                                       'iconv'
         17        SEND_VAL_EX                                              'UTF-8'
         18        SEND_VAL_EX                                              'ASCII%2F%2FTRANSLIT%2F%2FIGNORE'
         19        SEND_VAR_EX                                              !0
         20        DO_FCALL                                      0  $8      
         21        ASSIGN                                                   !0, $8
   11    22    >   INIT_FCALL                                               'strtolower'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $10     
         25        ASSIGN                                                   !0, $10
   12    26        INIT_FCALL                                               'preg_replace'
         27        SEND_VAL                                                 '%2F%5B%5E-%5Cw%5D%2B%2F'
         28        SEND_VAR                                                 !1
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $12     
         31        ASSIGN                                                   !0, $12
   14    32        INIT_FCALL                                               'trim'
         33        SEND_VAR                                                 !0
         34        SEND_VAL                                                 '-_+'
         35        DO_ICALL                                         $14     
         36        ASSIGN                                                   !0, $14
   16    37        ECHO                                                     !0
         38      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.35 ms | 1396 KiB | 23 Q