comment php in html code example
Example 1: comment in php
<?php
*/
?>
Example 2: comment in php
<?php
$var = 2 + 2;
echo $var;
?>
Example 3: comment in php
It is worth mentioning that, HTML comments have no meaning in PHP parser. So,
WILL execute some_function() and echo result inside HTML comment.
Example 4: comment in php
Comments do NOT take up processing power.
So, for all the people who argue that comments are undesired because they take up processing power now have no reason to comment ;)
<?php
echo microtime(), "<br />";
echo microtime(), "<br />";
echo microtime(), "<br />";
echo microtime(), "<br />";
?>
They take up about the same amount of time (about meaning on a repeated testing, sometimes the difference between the control and the test was negative and sometimes positive).