PHP Comment Tag -
in wonderful world of java/jsp, can use form of commenting:
<%-- in here ignored , not sent client can span multiple lines , useful commenting out blocks of jsp, including tags , html: <c:if test="${some.condition}"> <p>all inside comment</p> </c:if> <!-- html comment commented out of jsp not sent client --!> --%> <!-- html comment , sent client -->
in in less wonderful world of php, reference comments can find these:
/* multi-line comment */
and these:
// single line comment
but these won't comment out chucks of html , php tags:
/* <? do_something() ?> */
results in /* , */ being rendered browser, , do_something() still called.
is there equivalent of jsp comment shown above in php?
the reason not comment out block:
/* <? do_something() ?> */
is not in php in html , /* */
not valid comment structure in html.
if had
<?php /* some_php(); ?> , html <?php more_php(); */ ?>
it work fine. php inside comment block not executed , nothing of sent browser.
although doesn't work on code highlighter...
just make sure in php (after <?php
tag) when open comment section.
Comments
Post a Comment