Date: 12/23/01
- Next message: Gabor Hojtsy: "Re: [PHP-DOC] MySQL examples need review"
- Previous message: Masaki Fujimoto: "[PHP-DOC] cvs: phpdoc /ja/appendices history.xml"
- In reply to: Slawomir Pucia: "Re: [PHP-DOC] MySQL examples need review"
- Next in thread: Gabor Hojtsy: "Re: [PHP-DOC] MySQL examples need review"
- Reply: Gabor Hojtsy: "Re: [PHP-DOC] MySQL examples need review"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: "Slawomir Pucia" <slawek <email protected>>
> > Can you add anything to our coding conventions
> > discussion?
>
> First of all, I'm after PEAR coding standard in examples. However,
there are
> some elements which are not covered by PEAR docs:
First of all you should know, that the first writting of PHPDOC was
only a rewrite of Rasmusī PHP/FI manual. More and more authors and
contributors asked many times for a coding standard. So there we
included some in the source. After PEAR was born, Stig or other
persons wrote another for PEAR. Both standards differ in many
places. So I argue to stay with the current coding standards and
improve that.
> 1. Always use the same values for server, userneme, password and
database
> name, when connecting to database.
The database "marliesle" was very helpful to detect plagiarism.
> 2. Always use "or die(...)" in database examples.
> 3. Use print 'foo' when foo doesn't need to be parsed.
> 4. Use lowercase in HTML tags.
> 5. Don't use "$query='...'; mysql_query($query)" when its not
needed.
> 6. Don't use a variable which in not set in example (see $user in
> mysql_field_name example).
> 7. Decide whether to use echo or print (and printf) for output. I
preffer
> echo.
-Egon
- Next message: Gabor Hojtsy: "Re: [PHP-DOC] MySQL examples need review"
- Previous message: Masaki Fujimoto: "[PHP-DOC] cvs: phpdoc /ja/appendices history.xml"
- In reply to: Slawomir Pucia: "Re: [PHP-DOC] MySQL examples need review"
- Next in thread: Gabor Hojtsy: "Re: [PHP-DOC] MySQL examples need review"
- Reply: Gabor Hojtsy: "Re: [PHP-DOC] MySQL examples need review"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

