opt
/
cpanel
/
ea-wappspector
/
vendor
/
squizlabs
/
php_codesniffer
/
src
/
Standards
/
Generic
/
Docs
/
Strings
➕ New
📤 Upload
✎ Editing:
UnnecessaryHeredocStandard.xml
← Back
<documentation title="Unnecessary Heredoc"> <standard> <![CDATA[ If no interpolation or expressions are used in the body of a heredoc, nowdoc syntax should be used instead. ]]> </standard> <code_comparison> <code title="Valid: Using nowdoc syntax for a text string without any interpolation or expressions."> <![CDATA[ $nowdoc = <em><<<'EOD'</em> some text EOD; ]]> </code> <code title="Invalid: Using heredoc syntax for a text string without any interpolation or expressions."> <![CDATA[ $heredoc = <em><<<EOD</em> some text EOD; ]]> </code> </code_comparison> <code_comparison> <code title="Valid: Using heredoc syntax for a text string containing interpolation or expressions."> <![CDATA[ $heredoc = <em><<<"EOD"</em> some $text EOD; ]]> </code> <code title="Invalid: Using heredoc syntax for a text string without any interpolation or expressions."> <![CDATA[ $heredoc = <em><<<"EOD"</em> some text EOD; ]]> </code> </code_comparison> </documentation>
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel