3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "234pLdfvw"; $text = preg_replace('~[^\w\d]+~u', '-', $text); $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); $text = strtolower($text); // remove unwanted characters //$text = preg_replace('~[^-w]+~', '', $text); if (empty($text)) { echo 'n-a'; } echo $text;
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/WidWm
function name:  (null)
number of ops:  22
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '234pLdfvw'
    3     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%7E%5B%5E%5Cw%5Cd%5D%2B%7Eu'
          3        SEND_VAL                                                 '-'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    4     7        INIT_FCALL_BY_NAME                                       'iconv'
          8        SEND_VAL_EX                                              'utf-8'
          9        SEND_VAL_EX                                              'us-ascii%2F%2FTRANSLIT'
         10        SEND_VAR_EX                                              !0
         11        DO_FCALL                                      0  $4      
         12        ASSIGN                                                   !0, $4
    5    13        INIT_FCALL                                               'strtolower'
         14        SEND_VAR                                                 !0
         15        DO_ICALL                                         $6      
         16        ASSIGN                                                   !0, $6
   10    17        ISSET_ISEMPTY_CV                                         !0
         18      > JMPZ                                                     ~8, ->20
   12    19    >   ECHO                                                     'n-a'
   14    20    >   ECHO                                                     !0
         21      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.97 ms | 1395 KiB | 17 Q