NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Strip-able Comments


Joined: 19 Apr 2006
Posts: 3
Reply with quote
Do you think it would be a good idea to implement a certain character sequence for comments that get stripped out when uploading over FTP?

Like, you'd write

<?php //* test *//

in a file, and when you upload it to a FTP server, it'd just read

<?php

The comment would remain stored locally though.

Advantages:

* You can use extensive commenting without having to worry about the PHP files getting really large and slowing down the server.
* If other people have access to the PHP code you uploaded (because you did commission work and they own the website, for example - they could grab your code and sell it on), without the comments it's worth *a lot* less.

Disadvantages: None I could see. Upload might be a tad slower on large files because of replacing the file, but that's something I can live with. Besides, it would be an optional feature.

Thoughts?
View user's profileFind all posts by swieserSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8350
Reply with quote
Why not to use php encoder if you're afraid that code could be stolen?
Honestly, those bad guys do not need your comments to be successfull with their sales...
Regarding file size, I think it does not really matter if you use SFTP with compresstion turned on.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 19 Apr 2006
Posts: 3
Reply with quote
The one PHPEncoder I found is at Freelock and there it says:

[07-08-2004] Some SERIOUS issues found in current FreeLock design. DONT USE FOR SENSIBLE TASKS!!
Please stay tuned as we are working on a totally new methodology for it.

Looks like a dead project?

And I think that the PHP file gets larger and thus takes longer to parse.
View user's profileFind all posts by swieserSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8350
Reply with quote
YEp, it looks like a dead.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 19 Apr 2006
Posts: 3
Reply with quote
ddmitrie wrote:
YEp, it looks like a dead.


Also, doesn't a lot of comments make the PHP code take longer to parse? Without comments, the files would get smaller and faster to parse. I don't really need anything drastic, but I write quite a few comments, and without them, understanding the code pretty much takes as long as if you rewrote it yourself. Variable renaming and such would be an overkill and hard for you to do, whereas stripping comments if something your parser pretty much could do already anyway.
View user's profileFind all posts by swieserSend private message
Strip-able 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