note 127317 added to regexp.reference.onlyonce
| From: | Anonymous at main dot php dot net | Date: | Thu, 21 Jul 2022 09:21:53 +0000 |
| Subject: | note 127317 added to regexp.reference.onlyonce | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-219047@lists.php.net to get a copy of this message | ||
Never put a "once-only subpattern" (?>...) in a "one-line" comment (#, //).
I spent almost 1 day to fix it.
Use a 'C' style comment instead !
PHP Manual says, a "one-line" comment (# , //) ends just before "?>" (PHP end
tag).
These letters "?>" in a "one-line" comment (# , //) seems evaluated as a PHP
end tag.
<?php
/* (?> */
echo '"C" style comment works !<br>';
# (?>
echo '"one-line" comment';
?>
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.135 (proxied: 114.166.140.207)
----
Manual Page -- https://php.net/manual/en/regexp.reference.onlyonce.php
Edit -- https://main.php.net/note/edit/127317
Del: integrated -- https://main.php.net/note/delete/127317/integrated
Del: useless -- https://main.php.net/note/delete/127317/useless
Del: bad code -- https://main.php.net/note/delete/127317/bad+code
Del: spam -- https://main.php.net/note/delete/127317/spam
Del: non-english -- https://main.php.net/note/delete/127317/non-english
Del: in docs -- https://main.php.net/note/delete/127317/in+docs
Del: other reasons-- https://main.php.net/note/delete/127317
Reject -- https://main.php.net/note/reject/127317
Search -- https://main.php.net/manage/user-notes.php