3v4l.org

run code in 300+ PHP versions simultaneously
<?php setlocale(LC_ALL, 'en_GB'); $text = "Test êéest"; $text = preg_replace('~[^\\pL\d]+~u', '-', $text); $text = trim($text, '-'); $text = iconv('UTF-8','ASCII//TRANSLIT', $text); $text = strtoupper($text); $text = preg_replace('~[^-\w]+~', '', $text); echo $text;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aJiPl
function name:  (null)
number of ops:  34
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'setlocale'
          1        SEND_VAL                                                 6
          2        SEND_VAL                                                 'en_GB'
          3        DO_ICALL                                                 
    3     4        ASSIGN                                                   !0, 'Test+%C3%AA%C3%A9est'
    4     5        INIT_FCALL                                               'preg_replace'
          6        SEND_VAL                                                 '%7E%5B%5E%5CpL%5Cd%5D%2B%7Eu'
          7        SEND_VAL                                                 '-'
          8        SEND_VAR                                                 !0
          9        DO_ICALL                                         $3      
         10        ASSIGN                                                   !0, $3
    5    11        INIT_FCALL                                               'trim'
         12        SEND_VAR                                                 !0
         13        SEND_VAL                                                 '-'
         14        DO_ICALL                                         $5      
         15        ASSIGN                                                   !0, $5
    6    16        INIT_FCALL_BY_NAME                                       'iconv'
         17        SEND_VAL_EX                                              'UTF-8'
         18        SEND_VAL_EX                                              'ASCII%2F%2FTRANSLIT'
         19        SEND_VAR_EX                                              !0
         20        DO_FCALL                                      0  $7      
         21        ASSIGN                                                   !0, $7
    7    22        INIT_FCALL                                               'strtoupper'
         23        SEND_VAR                                                 !0
         24        DO_ICALL                                         $9      
         25        ASSIGN                                                   !0, $9
    8    26        INIT_FCALL                                               'preg_replace'
         27        SEND_VAL                                                 '%7E%5B%5E-%5Cw%5D%2B%7E'
         28        SEND_VAL                                                 ''
         29        SEND_VAR                                                 !0
         30        DO_ICALL                                         $11     
         31        ASSIGN                                                   !0, $11
    9    32        ECHO                                                     !0
         33      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160 ms | 1396 KiB | 21 Q