Page 1 of 1

Shell and C++ Style Comments

Posted: Tue Nov 26, 2002 9:14 pm
by AƩrolithe
In the book I am reading (Programming PHP) it mentions Shell- and C++ style comments, along with C style. In Shell- and C++ style comments it says that anything after the # or // is ignored until the end of the line or that section of code. Does this mean that it still reads ?> but nothing else? Or does it mean something else when it says section?

Posted: Tue Nov 26, 2002 9:50 pm
by hob_goblin

Code: Select all

<?
this_function_will_work(); // this_function_wont_work();
// this_function_wont();
this_function_will();
this_function_will_work(); # this_function_wont();
# this_function_wont();
this function_will();
/* this_function_wont();
this_function_wont();
this_function_wont(); */
this_function_will();
?>

Posted: Tue Nov 26, 2002 9:50 pm
by volka
try this one

Code: Select all

&lt;html&gt;&lt;body&gt;&lt;?php
// ?&gt;text
&lt;/body&gt;&lt;/html&gt;
and you'll see ;)