Is this <?php //comment ?> kind of comment workable in php? [closed]

With // and # style comments ?> will close the PHP block as well as the comment. With /* ... */ style comments it will not:

<?php # Closing PHP tag closes comment AND PHP block ?>
<?php // Closing PHP tag closes comment AND PHP block ?>
<?php /* Closing PHP tag DOES not close comment AND PHP block ?> */ ?>

Edit: Syntax highlighting here is wrong, the PHP block isn’t closed until the last one.

Browse More Popular Posts

Leave a Comment