Skip to content

Commit

Permalink
Adds code comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
tikifez committed Sep 17, 2024
1 parent 4424121 commit 1ad4251
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions WordPress/Docs/PHP/PregQuoteDelimiterStandard.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,17 @@
Passing the $delimiter parameter to preg_quote() is strongly recommended to ensure the delimiter required by the PCRE functions are escaped.
]]>
</standard>

<code_comparison>
<code title="Valid: The delimiter is included.">
<![CDATA[
preg_quote( $str, '/' );
]]>
</code>
<code title="Invalid: The delimiter is not included.">
<![CDATA[
preg_quote( $str );
]]>
</code>
</code_comparison>
</documentation>

0 comments on commit 1ad4251

Please sign in to comment.