______ azszpr313414 ___
I took a look at the PHP manual but did not say anything, I saw a guy not using the third parameter and then I was in doubt if it is mandatory or not
______ azszpr313406 ___
It's not, check it out in the documentation: link
These %code% indicate optional arguments, in PHP there are predefined arguments, when you omit in your use php passes the default value, which in the specific case of this function would be %code% , the code you posted shows that the person has changed %code% by %code% , that is, each one is for one thing, just see the values supported in link
As it says in the doc:
If omitted, %code% will be used, which is equivalent to %code% . This will result in no filtering taking place by default.
If omitted, it will use %code% , which is equivalent to %code% . This will result in an unfiltered value.
Just to note, %code% is part of the link , this filter in the case escapes / converts characters such as: %code% , %code% , %code% , among others that the ASCII value is less than 32, ie something like:
Will print this:
What are HTML entities, which when rendered on the page actually display %code% , but without affecting HTML.
The documentation of the %code% function says the following about the third parameter:
"If omitted, FILTER_DEFAULT will be used, which is equivalent to FILTER_UNSAFE_RAW. This will result in no filtering taking place by default."
That is, the third parameter is not required and can be omitted. Although this does not filter the value in fact.