Re: [PHP-DOC] coding standards - draft

2002-01-10 Thread Gyozo Papp
| > | > $conn = mysql_connect(...) or user_error("Cannot connect", | E_USER_ERROR); | > | > lacks flexibility, not in error_handling but the in the or construct. | > | Philip | > | > Olson dropped a note about this in a recent mail. | > | > I'll check it, but you can write still: | > | > $

Re: [PHP-DOC] coding standards - draft

2002-01-10 Thread Gabor Hojtsy
> > So example can contain screens and paras. So the COMPLETE > > EXAMPLE SKELETON in your draft is right. > > Thanks for your check. As said, I am not very familiar with Docbook :-). > Therfore I didn`t ment that this is the only one and right way to write > examples :-) With certainty someone

Re: [PHP-DOC] coding standards - draft

2002-01-10 Thread Gabor Hojtsy
> | > $conn = mysql_connect(...) or user_error("Cannot connect", E_USER_ERROR); > | > lacks flexibility, not in error_handling but the in the or construct. > | Philip > | > Olson dropped a note about this in a recent mail. > > I'll check it, but you can write still: > > $connect = mysql_connect(..

Re: [PHP-DOC] coding standards - draft

2002-01-09 Thread Gyozo Papp
"Gabor Hojtsy" <[EMAIL PROTECTED]> wrote in message 005101c1990c$bac51520$281ca3d5@Mia">news:005101c1990c$bac51520$281ca3d5@Mia... | > +1 for trigger_error(); -1 for user_error: alias for trigger_error +1 for trigger_error(); -1 for user_error, so do I. IMHO, the main point is that using

Re: [PHP-DOC] coding standards - draft

2002-01-09 Thread holliwell
> > > (Sample output: > > > not as familiar to docbook as you are. > > > Therefore i just copied this from array.xml; first example with > screen.. > > > Btw. there are many differrent ways used with this thing.) > > > > Check if it is still there, from where you copied. If it is, > > then it is

Re: [PHP-DOC] coding standards - draft

2002-01-09 Thread Gabor Hojtsy
> > (Sample output: > > not as familiar to docbook as you are. > > Therefore i just copied this from array.xml; first example with screen.. > > Btw. there are many differrent ways used with this thing.) > > Check if it is still there, from where you copied. If it is, > then it is docbook compatib

Re: [PHP-DOC] coding standards - draft

2002-01-09 Thread Gabor Hojtsy
> +1 for trigger_error(); -1 for user_error: alias for trigger_error OK, use trigger_error(). Is user_error() a deprecated alias? > syslog seems always a bit suspicious to me. Depending on the webserver > configuration, that user may have insufficient rights to write into?? > On win detailed tun

Re: [PHP-DOC] coding standards - draft

2002-01-09 Thread Friedhelm Betz
>> Thanks for your additions. Looking forward for more.:-) >> I tried to incorporate them, also the contributions from the other people. >> Have a look online http://www.holliwell.de/draft/draft1 >> or download at http://www.holliwell.de/draft/draft1.tar.gz (about 4kb) >> Keep in mind it`s a

Re: [PHP-DOC] coding standards - draft

2002-01-09 Thread Gabor Hojtsy
> Thanks for your additions. Looking forward for more.:-) > I tried to incorporate them, also the contributions from the other people. > Have a look online http://www.holliwell.de/draft/draft1 > or download at http://www.holliwell.de/draft/draft1.tar.gz (about 4kb) > Keep in mind it`s a draft

Re: [PHP-DOC] coding standards - draft

2001-12-29 Thread Friedhelm Betz
> Nice. Some additions: [...] > I may some up with more suggestions in the future, these > are the ones came to my mind reading your draft. Feel > free to discuss, and incorporate where appropriate. Thanks for your additions. Looking forward for more.:-) I tried to incorporate them, also the

Re: [PHP-DOC] coding standards - draft

2001-12-28 Thread Gabor Hojtsy
> > OK, can you give an example you can do with ${} but you can't with > > {$} and the opposite? Would be nice to clear at least my mind about > > that :) We may include an example in the manual to show people > > why we have two "frighteningly" similar things for the same thing > > > > echo "this

Re: [PHP-DOC] coding standards - draft

2001-12-28 Thread Philip Olson
> > This makes sense as $beers is not a set variable. {$beer}s works too > > though, seems okay that both work. Anyway, this isn't an array ;-)) > > OK, can you give an example you can do with ${} but you can't with > {$} and the opposite? Would be nice to clear at least my mind about > that :

Re: [PHP-DOC] coding standards - draft

2001-12-28 Thread Gabor Hojtsy
> This makes sense as $beers is not a set variable. {$beer}s works too > though, seems okay that both work. Anyway, this isn't an array ;-)) OK, can you give an example you can do with ${} but you can't with {$} and the opposite? Would be nice to clear at least my mind about that :) We may incl

Re: [PHP-DOC] coding standards - draft

2001-12-28 Thread Philip Olson
> Why there are two ${} and {$} See > http://www.php.net/manual/en/language.types.string.php#language.types.string > .parsing for the examples. > > Simple syntax > > echo "He drunk some ${beer}s"; // works This makes sense as $beers is not a set variable. {$beer}s works too though, seems

Re: [PHP-DOC] coding standards - draft

2001-12-28 Thread Gabor Hojtsy
> > I talked about ${} and not {$}. ${} also works, at > > least in some cases. And it is in the docs. Is this > > an inconsistency in PHP? > > Regarding inconsistency, I've never used ${} for this and don't see any > docs that mention this syntax for arrays in strings. The docs do mention > {$}

Re: [PHP-DOC] coding standards - draft

2001-12-28 Thread Philip Olson
> I talked about ${} and not {$}. ${} also works, at > least in some cases. And it is in the docs. Is this > an inconsistency in PHP? Regarding inconsistency, I've never used ${} for this and don't see any docs that mention this syntax for arrays in strings. The docs do mention {$} syntax though

Re: [PHP-DOC] coding standards - draft

2001-12-28 Thread Gabor Hojtsy
>3. Keep in mimd: In section nothing is parsed. So be sure > to put XML-code that needs parsing outside of CDATA sections, e.g. > comments or links. > See (for example): Language reference|Types|Arrays under Examples; > or Language reference|Types|Strings I hope I have now corrected thos

Re: [PHP-DOC] coding standards - draft

2001-12-28 Thread Gabor Hojtsy
> +1 for not worrying about strings this way, either is okay. If I were to > pick one (which is imho a bad idea) it be using "". But, this is not > always the case, depends. Now, I believe the bulk of Jan's comment was > regarding arrays here, which was: > > 'string '. $arr['key'] .' blah';

Re: [PHP-DOC] coding standards - draft

2001-12-28 Thread Gabor Hojtsy
> > > >concatenation makes code unreadable > > > I disagree on that. I think strinc concatenation makes the code more > > > readble, because of the face, that what a variable is is clearly > > > separated from what the string is. > > > > > > echo "bar is $bar"; > > > vs. > > > echo 'bar is '.

Re: [PHP-DOC] coding standards - draft

2001-12-28 Thread Philip Olson
> > echo "bar is $bar"; > > vs. > > echo 'bar is '.$bar; > > > > additionaly in the first version $bar will be automagically transformed > > into a string, which is not nessecary. > > In the second version, you used the . operator, which also > automagically transforms $bar into a string for tha

Re: [PHP-DOC] coding standards - draft

2001-12-28 Thread Jan Lehnardt
Hi, On Fri, 28 Dec 2001 19:03:56 +0100 "Gabor Hojtsy" <[EMAIL PROTECTED]> wrote: > > >concatenation makes code unreadable > > I disagree on that. I think strinc concatenation makes the code more > > readble, because of the face, that what a variable is is clearly > > separated from what the s

Re: [PHP-DOC] coding standards - draft

2001-12-28 Thread Gabor Hojtsy
> >concatenation makes code unreadable > I disagree on that. I think strinc concatenation makes the code more > readble, because of the face, that what a variable is is clearly > separated from what the string is. > > echo "bar is $bar"; > vs. > echo 'bar is '.$bar; > > additionaly in the fi

Re: [PHP-DOC] coding standards - draft

2001-12-28 Thread Jan Lehnardt
Hi, On Fri, 28 Dec 2001 18:36:22 +0100 "Gabor Hojtsy" <[EMAIL PROTECTED]> wrote: >concatenation makes code unreadable I disagree on that. I think strinc concatenation makes the code more readble, because of the face, that what a variable is is clearly separated from what the string is. echo

Re: [PHP-DOC] coding standards - draft

2001-12-28 Thread Gabor Hojtsy
> I gathered the suggestions made by the people, put the relevant pieces > from the current howto, added PEAR Coding standards and some > suggestions of mine to a working draft for coding standards. Its far > away from beeing perfect, but maybe a starting point for further > discussion. > > Inter