3v4l.org

run code in 300+ PHP versions simultaneously
<?php function sanitize_style_input( $style ){ $style = str_replace("'", "", $style); $clean_style = preg_replace('/[^a-zA-Z0-9.:;\- #\\\,\\\(\\\)%]/i', '', $style ); return $clean_style; } echo sanitize_style_input( "#000000;" );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PitlD
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'sanitize_style_input'
          1        SEND_VAL                                                 '%23000000%3B'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function sanitize_style_input:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/PitlD
function name:  sanitize_style_input
number of ops:  15
compiled vars:  !0 = $style, !1 = $clean_style
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        INIT_FCALL                                               'str_replace'
          2        SEND_VAL                                                 '%27'
          3        SEND_VAL                                                 ''
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $2      
          6        ASSIGN                                                   !0, $2
    4     7        INIT_FCALL                                               'preg_replace'
          8        SEND_VAL                                                 '%2F%5B%5Ea-zA-Z0-9.%3A%3B%5C-+%23%5C%5C%2C%5C%5C%28%5C%5C%29%25%5D%2Fi'
          9        SEND_VAL                                                 ''
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $4      
         12        ASSIGN                                                   !1, $4
    5    13      > RETURN                                                   !1
    6    14*     > RETURN                                                   null

End of function sanitize_style_input

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.21 ms | 1397 KiB | 18 Q