3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sanitizeFilename(string $name): string { return preg_replace( ['/ +/', '/\W+/'], ['_', ''], $name ); } echo sanitizeFilename('This/has a Gap !n 1t');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AeSnP
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'sanitizefilename'
          1        SEND_VAL                                                 'This%2Fhas+a++++++Gap+%21n+1t'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function sanitizefilename:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/AeSnP
function name:  sanitizeFilename
number of ops:  10
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'preg_replace'
    5     2        SEND_VAL                                                 <array>
    6     3        SEND_VAL                                                 <array>
    7     4        SEND_VAR                                                 !0
    4     5        DO_ICALL                                         $1      
    7     6        VERIFY_RETURN_TYPE                                       $1
          7      > RETURN                                                   $1
    9     8*       VERIFY_RETURN_TYPE                                       
          9*     > RETURN                                                   null

End of function sanitizefilename

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.47 ms | 1007 KiB | 15 Q