3v4l.org

run code in 300+ PHP versions simultaneously
<?php $r = array(); $org = ' valid_The Cat 1-Name%'.PHP_EOL; $r[] = $org; $clear = strip_tags($org); $clear = html_entity_decode($clear); $clear = urldecode($clear); $clear = preg_replace('/[^A-Za-z0-9]/', ' ', $clear); $clear = preg_replace('/ +/', ' ', $clear); $filter = filter_var($clear, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH); $r[] = $filter; $trim = trim($filter); $r[] = $trim; $mv_space = str_replace(' ', '-', $trim); $r[] = $mv_space; $rm_w = str_replace(array("\n", "\r", "\t"), '', $mv_space); $r[] = $rm_w; $lower = strtolower($rm_w); $r[] = $lower; var_dump($r);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/XmMtO
function name:  (null)
number of ops:  68
compiled vars:  !0 = $r, !1 = $org, !2 = $clear, !3 = $filter, !4 = $trim, !5 = $mv_space, !6 = $rm_w, !7 = $lower
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        ASSIGN                                                   !1, '+valid_The+Cat+1-Name%25%0A'
    7     2        ASSIGN_DIM                                               !0
          3        OP_DATA                                                  !1
   10     4        INIT_FCALL                                               'strip_tags'
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $11     
          7        ASSIGN                                                   !2, $11
   12     8        INIT_FCALL                                               'html_entity_decode'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $13     
         11        ASSIGN                                                   !2, $13
   14    12        INIT_FCALL                                               'urldecode'
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                         $15     
         15        ASSIGN                                                   !2, $15
   16    16        INIT_FCALL                                               'preg_replace'
         17        SEND_VAL                                                 '%2F%5B%5EA-Za-z0-9%5D%2F'
         18        SEND_VAL                                                 '+'
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                         $17     
         21        ASSIGN                                                   !2, $17
   18    22        INIT_FCALL                                               'preg_replace'
         23        SEND_VAL                                                 '%2F+%2B%2F'
         24        SEND_VAL                                                 '+'
         25        SEND_VAR                                                 !2
         26        DO_ICALL                                         $19     
         27        ASSIGN                                                   !2, $19
   22    28        INIT_FCALL                                               'filter_var'
         29        SEND_VAR                                                 !2
         30        SEND_VAL                                                 513
         31        SEND_VAL                                                 12
         32        DO_ICALL                                         $21     
         33        ASSIGN                                                   !3, $21
   23    34        ASSIGN_DIM                                               !0
         35        OP_DATA                                                  !3
   25    36        INIT_FCALL                                               'trim'
         37        SEND_VAR                                                 !3
         38        DO_ICALL                                         $24     
         39        ASSIGN                                                   !4, $24
   26    40        ASSIGN_DIM                                               !0
         41        OP_DATA                                                  !4
   28    42        INIT_FCALL                                               'str_replace'
         43        SEND_VAL                                                 '+'
         44        SEND_VAL                                                 '-'
         45        SEND_VAR                                                 !4
         46        DO_ICALL                                         $27     
         47        ASSIGN                                                   !5, $27
   29    48        ASSIGN_DIM                                               !0
         49        OP_DATA                                                  !5
   31    50        INIT_FCALL                                               'str_replace'
         51        SEND_VAL                                                 <array>
         52        SEND_VAL                                                 ''
         53        SEND_VAR                                                 !5
         54        DO_ICALL                                         $30     
         55        ASSIGN                                                   !6, $30
   32    56        ASSIGN_DIM                                               !0
         57        OP_DATA                                                  !6
   34    58        INIT_FCALL                                               'strtolower'
         59        SEND_VAR                                                 !6
         60        DO_ICALL                                         $33     
         61        ASSIGN                                                   !7, $33
   35    62        ASSIGN_DIM                                               !0
         63        OP_DATA                                                  !7
   38    64        INIT_FCALL                                               'var_dump'
         65        SEND_VAR                                                 !0
         66        DO_ICALL                                                 
         67      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.16 ms | 1400 KiB | 31 Q