Re: +1 Renaming Functions
| From: | Zak Greant | Date: | Wed, 07 Feb 2001 02:01:02 +0000 |
| Subject: | Re: +1 Renaming Functions | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-2256@lists.php.net to get a copy of this message | ||
While this is interesting, it goes significantly beyond the scope of the
renaming function discussion and appears to be targeted at code written in
PHP, and not the PHP engine code.
Also, there is a standard for how PHP functions should be named already --
see
http://cvs.php.net/viewcvs.cgi/php4/CODING_STANDARDS?rev=1.6&content-type=t
ext/vnd.viewcvs-markup
--zak
----- Original Message -----
From: "Cynic" <cynic@mail.cz>
To: "Hellekin O. Wolf" <hellekin@cepheide.org>
Cc: <php-qa@lists.php.net>
Sent: Tuesday, February 06, 2001 6:27 PM
Subject: Re: [PHP-QA] +1 Renaming Functions
> excertps from the page:
>
> >Always put the constant on the left hand side of
> >an equality/inequality comparison.
> (...)
> >should be written instead as
> >if (($bufsize % strlen($str)) == 0)
>
> xxxxxxx
>
> >HTTP_*_VARS are either enabled or disabled. When enabled
> >all variables must be accessed throught $HTTP_*_VARS[key].
> >When disabled all variables can be accessed by the key name.
>
> It'd be probably better to say that (as far as PHP 4 is
> concerned) "import of EGPCS variables into the global scope
> may be disabled". track_vars is always on since 4.0.3 IIRC.
> if you can access $HTTP_*_VARS[x] it doesn't mean you _have_
> to do it that way - register_globals could be on too.
>
> xxxxxxx
>
> >Use extension .html on all files who are visible to the user,
> >or use extension .php where extension .html is not available.
> (...)
> >The use of .inc or .class can be a security problem. On most
> >servers these extensions aren't set to be run by a pharser.
>
> IMO the latter contradicts the former. On most servers .html
> files aren't set to be parsed by PHP. Use of .inc (or whatever)
> for include files is a security issue only if you don't take
> appropriate steps:
>
> a) set them as parsed by the engine (if you do anything else
> than define classes, functions and stuff, ie.
> http://somewhere.com/lib/mylib.inc would result in a row
> deleted
> from a db or something), you can wrap such a file in a
> defined( 'INCLUDED' ) check and define the constant in the file
> that's including the .inc file.
> b) <FilesMatch "\.inc$"> deny from all </FilesMatch> is your
> friend.
> c) put them outside the webroot tree.
> d) something I haven't thought of.
> e) a combination of the above.
>
> xxxxxxx
>
> <nitpick>
> "pharse" should be "parse"
> "the right of passage" should be "the rite of passage"
> "Tags are used for delimit" should be "Tags are used to delimit"
> "There are serval ways" should be "There are several ways"
> </nitpick>
>
>
> Good work.
>
>
> At 01:12 7.2. 2001, Hellekin O. Wolf wrote the following:
> --------------------------------------------------------------
> >Netscape trashed my long claiming php advocate prose...
> >
> >Neway :
> >
> >http://utvikler.start.no/code/php_coding_standard.html
> >
> >Does the php group agree on this ?
> >
> >Then we have a naming convention... The PHP source holds a functions
> >list.
> >If we can just match the two and assess the PHPCS, then we can both make
> >it better and solve our naming scheme for a while.
> >
> >Times will be then to measure performance implications of all that
> >multiple-naming constraint and submit to php-dev for discussion and
> >implementation...
> >
> >Well, human triggers gets me stuck in the real world... ttyl
> >
> >hellekin =8)
> >
> >--
> >PHP Quality Assurance Mailing List
> ><http://www.php.net/>
> >To unsubscribe, e-mail: php-qa-unsubscribe@lists.php.net
> >For additional commands, e-mail: php-qa-help@lists.php.net
> >To contact the list administrators, e-mail: php-list-admin@lists.php.net
> ------end of quote------
>
>
>
> ____________________________________________________________
> Cynic:
>
> A member of a group of ancient Greek philosophers who taught
> that virtue constitutes happiness and that self control is
> the essential part of virtue.
>
> cynic@mail.cz
>
>
>
> --
> PHP Quality Assurance Mailing List <http://www.php.net/>
> To unsubscribe, e-mail: php-qa-unsubscribe@lists.php.net
> For additional commands, e-mail: php-qa-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>