|
I've recently taken up PHP as my language of choice for learning how to program. I now have a simple question regarding naming conventions in PHP. When a variable or function is declared with a single underscore as the first character (i.e. $_foo or $_fake_function()), what exactly does this tell me as a programmer?
|
# ¿ Mar 27, 2008 17:23 |
|
|
# ¿ Apr 29, 2024 17:48 |
|
Standish posted:It has no set meaning, but it's often used to denote an class member or an internal function i.e. anything that shouldn't be directly used except by the original author of the code. That's what I was looking for. Thanks!
|
# ¿ Mar 27, 2008 17:41 |
|
I'm writing a script to validate URLs, and one part of the script validation is a check to see if the document exists (i.e. seeing if there's a response). Is there a faster function to use than get_headers? For me, get_headers is extremely slow and I'm going to be validating thousands of URLs.
|
# ¿ Jun 16, 2008 18:39 |
|
Lankiveil posted:What is the current cool framework to use for PHP? At the moment I'm playing with CodeIgniter, but I'm happy to jump ship if there's something better out there. If you like CodeIgnitor, check out Kohana. It's a PHP5 based framework originally built from CI, but completely rewritten to take advantage of PHP5's 'features'. It is a really robust framework and I use it all the time in my projects. https://www.kohanaphp.com
|
# ¿ Nov 26, 2008 01:45 |
|
I have a 'dataprocessor' library written in PHP that parses through a CSV file that varies in size (1K to 2M). The larger files end up taking quite a bit of memory because of the looping required to manipulate the actual data itself. Now my question - is there a way to free up memory in PHP during the execution of the script? I call the unset() function on the variables that are unused but I don't think that unset is actually meant to free up memory.
|
# ¿ May 18, 2009 19:59 |