Shell and C++ Style Comments

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Aérolithe
Forum Newbie
Posts: 7
Joined: Tue Nov 26, 2002 7:40 pm
Location: Missouri, USA

Shell and C++ Style Comments

Post 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?
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post 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();
?>
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post 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 ;)
Post Reply