3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = "234pLdfv"; $text = preg_replace('~[^pLd]+~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 = 25, Position 2 = 26
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 26
filename:       /in/Bn6I6
function name:  (null)
number of ops:  28
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, '234pLdfv'
    3     1        INIT_FCALL                                               'preg_replace'
          2        SEND_VAL                                                 '%7E%5B%5EpLd%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
    8    17        INIT_FCALL                                               'preg_replace'
         18        SEND_VAL                                                 '%7E%5B%5E-w%5D%2B%7E'
         19        SEND_VAL                                                 ''
         20        SEND_VAR                                                 !0
         21        DO_ICALL                                         $8      
         22        ASSIGN                                                   !0, $8
   10    23        ISSET_ISEMPTY_CV                                         !0
         24      > JMPZ                                                     ~10, ->26
   12    25    >   ECHO                                                     'n-a'
   14    26    >   ECHO                                                     !0
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.08 ms | 1387 KiB | 20 Q