I was just updating polish mysql.xml, and I must say that original version
is a real mess when it comes to examples. There are lot of different
naming
and coding conventions. I think this file needs general review of its
examples.
Yes, we are already in the discussion of coding standards.
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:
1. Always use the same values for server, userneme, password and database
name, when connecting to
From: Slawomir Pucia [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
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.
Some things were covered in the old howto (for those who
can't
www.concertband.de
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.
Some things were covered in the old
See version 1.1 of README. The latest version have now only a link
to the howto.tar file.
OK, I have seen that file now.
http://cvs.php.net/co.php/phpdoc/README?r=1.1
Look at the function skeleton for example in that file:
function some_code($foo)
{
/* we all agree that four spaces of
From: Gabor Hojtsy [EMAIL PROTECTED]
See version 1.1 of README. The latest version have now only a
link
to the howto.tar file.
OK, I have seen that file now.
http://cvs.php.net/co.php/phpdoc/README?r=1.1
Look at the function skeleton for example in that file:
function some_code($foo)
This file is not that much different than the current howto
contents about conventions. This 1.1 really have no coding
conventions, just some skeletons. No rules about how to write
PHP code, except the ?php ? form convention in point 5.
So where we can find the previously written down
Hi,
On Sun, 23 Dec 2001 18:38:45 +0100
Gabor Hojtsy [EMAIL PROTECTED] wrote:
What do others think about that?
I give a +1 for adapting the PEAR coding standard for Manual examples.
Some things must be recognized. At first PEAR does have a excellent
error handling, but it is to complex to
$variables shoud be concatenated with '. instead of using $var strng.
What is the reason? If there aren't any efficiency considerations then IMHO
$var strng is more clear.
slawek-
What do others think about that?
I give a +1 for adapting the PEAR coding standard for Manual examples.
-1 for anything complicated in the manual. Keep everything clear and concise
why do we need to clutter examples with PEAR error everywhere (Nothing
against pear I think its great but I
-1 for anything complicated in the manual. Keep everything clear and
concise
why do we need to clutter examples with PEAR error everywhere
AFAIK the idea is to adapt PEAR *coding standard* to examples, not to use
PEAR itself.
slawek-
I don't think anyone means 'use pear' in the examples, just the standard.
Like, what makes for a defining a function, construct spacing, etc. Odds
are the pear coding standard will be a base which will be modified to suit
phpdoc needs.
Regarding whether to use echo or print, concat variables or
Hi,
On Sun, 23 Dec 2001 19:37:02 +0100
Slawomir Pucia [EMAIL PROTECTED] wrote:
$variables shoud be concatenated with '. instead of using $var
strng.
What is the reason? If there aren't any efficiency considerations then
IMHO
$var strng is more clean
personal opinion, I think $var.'string'
Hi,
On Sun, 23 Dec 2001 18:59:52 + (GMT)
Philip Olson [EMAIL PROTECTED] wrote:
And fwiw, I'm against forcing 'or die' formatting in any example, it's
not
all that flexible.
can you please give an example where 'or die()' is 'not flexible'.
Jan
--
Q: Thank Jan? A:
Regarding whether to use echo or print, concat variables or not, etc. No
need to get that specific imho. Just the basics, like formatting.
It simply looks nicer for reader if all examples (at least in one chapter)
are similar. Look at these lines from mysql.xml:
mysql_connect(mysql_host,
Hi there.
I thought I'll start a new topic for this.
You won't punish me for that? :P
What do others think about that?
I give a +1 for adapting the PEAR coding standard for Manual examples.
+1 from me.
Slawomir Pucia said some mails ago, we should be consistent about using
' or for
$variables shoud be concatenated with '. instead of using $var strng.
-1. I prefer $var string.
$var. string is less ambigious. Actually it should be $var.' string' as
$var string and '$var string' behave differently $var.' string' and $var.
string work the same.
- James
can you please give an example where 'or die()' is 'not flexible'.
I am referring to 'or' specifically. For example:
$conn = mysql_connect($host, $user, $pass) or die('Connection failed');
Okay that works. But let's say one wants to do multiple statements on
failure, the following will not
Not sure if I agree they need to be identical, I did last month but now it
doesn't seem like a big deal (pending discussion). Variety is the spice
of life :)
Regarding below examples, 'single quotes' should be used in every
instance. The spacing looks fine, though. And, whether or not to
I was just updating polish mysql.xml, and I must say that original version
is a real mess when it comes to examples. There are lot of different naming
and coding conventions. I think this file needs general review of its
examples.
slawek-
Hi Slawek-
Yes, many agree. There is a discussion on whether or not to use a coding
standard in php examples and if so what standard to use/define.
See the recent thread on 'doc standards'.
regards,
Philip Olson
On Sat, 22 Dec 2001, Slawomir Pucia wrote:
I was just updating polish
22 matches
Mail list logo