Re: [PHP-DOC] cvs: phpdoc /en/functions info.xml From: Lars Torben Wilson (torben <email protected>)
Date: 08/28/00

Ron Chmara writes:
> Well, there's good and bad points to each method.

As in most things in life--never a Right Answer when you need
one. Dammit. :)

> > > And so on, showing the new textual syntax _along with_ the old syntax,
> > > to provide for transitioning, and user choice in error codes.
> > What do you mean by 'new textual syntax'? These constants have been
> > available since PHP 3.0.2;
>
> I'm doing a bunch of php/fi (2!) updates, working with coders who are
> still learning 3, on a live site, with 200+ pages of code left to fix...
> So, relatively new in _that_ sense, as well as "new to those who were
> using int's".

Ah...the good old days. That makes more sense. I think I've still got
an old PHP/FI manual I printed out around here somewhere. Hard to
believe that was only 3 years ago.

> > it's just the ones relevant to the PHP 4
> > execution model which have been added recently (E_COMPILE_*, E_CORE_*,
> > and E_USER_*). The hardest transitioning would be if one was using
> > ints in PHP 3, and wanted e.g. to get everything except notices:
> > error_reporting(55); // (PHP 3 equivalent to E_ALL ^ E_NOTICE)
> > ...in PHP 4, '55' would mean (E_ERROR | E_WARNING | E_PARSE |
> > E_CORE_ERROR | E_CORE_WARNING); you'd need to change them all to
> > '2039'. Whereas the following:
> > error_reporting(E_ALL ^ E_NOTICE);
> > ...means the same in both. Easier to maintain.
>
> This is the kind of detail I was referring to. :-) Can you take a look
> at what's in the XML file right now, and fix it up to be php3/4 relevant?
>
> > Maybe just a note along the lines of 'if you use ints, be aware that
> > the values may not be portable between versions of PHP'. I mean,
> > obviously folks are gonna do what they want anyway. But noting the
> > dangers might help avoid some obvious questions later on.
>
> Yup. I was never told about "the dangers of int", and until last
> night, had never even *considered* using anything else. All the legacy
> code uses int's, I've been using ints, and we still don't have an
> example setup on the page of how to do it *without* ints...
>
> Hence, my request for new examples, with a "rosetta stone" for coders
> to compare their old code to. ;-)
>
> -Bop

I (and I hope/suppose anyone else who wants to) will immediately put
it off until PHP 5...er...I mean, get on it right away. :)

I just did a bit of an update the other day on the
features/error-control page wrt this--I'll try to think up some useful
examples to help out.

Cheers,

Torben

-- 
+----------------------------------------------------------------+
|Torben Wilson <torben <email protected>>                     Netmill iTech|
|http://www.coastnet.com/~torben            http://www.netmill.fi|
|Ph: 1 250 383-9735                             torben <email protected>|
+----------------------------------------------------------------+