NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Question about leaving PHPDoc comments


Joined: 02 Jan 2008
Posts: 28
Location: Palmyra, NJ
Reply with quote
Hello,

I am about to encode my first project using Nu-Coder, and will be encoding it to a new directory as directed in project properties. There's also an option as to whether or not to leave in PHPDoc comments, and I'm not sure if I would need to or not.

It would definitely cut file sizes, and I won't be using these files for development purposes (for code hinting, etc.). However, I noticed in the manual this section:

Quote:
Preserve and not strip php-doc comments, useful for reflection


I am not that familiar with PHP's reflection API, but is this referring to some methods of it that use php doc comments? Or is it referring to functionality within PhpEd?

Just based on what I've written here, is it safe for me to assume I can strip php-doc comments without breaking anything? Laughing

Thanks for the help, I'm looking forward to finally deploying an encoded product!
-Eric
View user's profileFind all posts by unarmedmanSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
You may want to check this manual page http://www.php.net/language.oop5.reflection to see how phpdoc is used with reflection, then decide if it's what you need to keep on or off when you encode your files.
Regarding PhpED and debugger, this feature has absolutely no effect.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 02 Jan 2008
Posts: 28
Location: Palmyra, NJ
Reply with quote
Hey dmitri, thanks for the reply. After posting my original question I did make it over the the Reflection manual, and it looks to me like the only method that uses the doc block is getDocComment(). Do you (or anyone else) know of any other method besides this one to look out for?

So I guess I should refine my question to this - since I don't use getDocComment() in any of my application, is it safe to strip the doc blocks?

Thanks again for advising a total newbie to this whole process!
View user's profileFind all posts by unarmedmanSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
So I guess I should refine my question to this - since I don't use getDocComment() in any of my application, is it safe to strip the doc blocks?

It is safe to strip phpdocs even if you use that method. It will work as if no phpdocs did not appear in your code. In other words an empty string will be returned.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 02 Jan 2008
Posts: 28
Location: Palmyra, NJ
Reply with quote
Great - thank you!
View user's profileFind all posts by unarmedmanSend private messageVisit poster's website
Question about leaving PHPDoc comments
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic