Well, I'm dragging myself through it to check out the language's specifications and some tips/hints on how to do things the right way.
I know Alex has done A LOT of PHP scripting before. So any tips for better script performance? :)
Printable View
Well, I'm dragging myself through it to check out the language's specifications and some tips/hints on how to do things the right way.
I know Alex has done A LOT of PHP scripting before. So any tips for better script performance? :)
One thing i know he would tell you (arti was my teacher ;D)
Really organize your code. Classes in different files. I normally put all my functions for users in a file called functions.users.php and put it in the include file. Add a class inside the file called users. Then put all your functions with users in that file. And so on.
Alex was my some what teacher. Told me to organize my code, make it as clean as possible, and rename controls so you know what it is. Example: StringName would be strName.
Nobody really declares variables like that in PHP. It's more common in some of the visual languages.
While the PHP.net site is great as a reference point, I've tended to stay away from it. The only reason I've used it is for documentation on specific functions. php.net/function_name. There are some great books out there that are somewhat enjoyable to read. I suggest you go to Amazon, search for PHP and organize by the rating in descending order. You can either purchase them or download digital copies online. I have about 10 or so great resources on my Kindle that I tend to read through when bored.
edit: while we're on the topic of PHP, anyone want to help me develop the main LG site? Going to give it a crack over the weekend.
Make a Bot selling site so we can make some money for LG. D<
Alright, thanks. :)
So organization is important. I'm happy that I tend to be organized. What sucks is documenting the code. However, it's essential for Team Development... Hmm, some kind of tool to parse out each function and propertie of a class would be very handy. I'll work on something like that. :)
And by the way, what do you mean the main LG site? What are you planning? :P
-removed-
Design is bleh, I know.
edit: scratch that, redoing