Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-05 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-05 16:29:04 -0600: > Pretend you are using some library of software with a lot of code, and > you have a lot of your own code. > > There are try/catch blocks all over the place. > > The library does something with try/catch, and you don't like the way > it handles th

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-05 Thread Richard Lynch
On Thu, January 4, 2007 8:26 pm, Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-04 18:45:07 -0600: >> On Thu, January 4, 2007 6:17 pm, Roman Neuhauser wrote: >> > Ok, but what harm has been done? something() presumably did the >> > fopen() for a reason, and couldn't work without the file ha

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-04 18:45:07 -0600: > On Thu, January 4, 2007 6:17 pm, Roman Neuhauser wrote: > > Ok, but what harm has been done? something() presumably did the > > fopen() for a reason, and couldn't work without the file handle and > > couldn't succeed anyway. > > > > Sure, the progr

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Richard Lynch
On Thu, January 4, 2007 6:17 pm, Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-04 16:34:46 -0600: >> You end up catching somebody else's error and handling it, even >> though >> what you THINK has gone wrong is not at all what actually went >> wrong, >> because they didn't write a try/catc

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Richard Lynch
On Thu, January 4, 2007 4:54 am, Roman Neuhauser wrote: > echo $blah . "\n" is *not* equivalent to printf("%s\n", $blah) Mathematically-speaking, not only is it equivalent, it is equal. :-) I think... Okay, I'll turn that into a question: For what input of $blah do these output different string

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-04 16:34:46 -0600: > On Wed, January 3, 2007 3:43 pm, Roman Neuhauser wrote: > That __toString magic didn't even exist in earlier versions, and has > already changed out from under you once, right?... The whole program depends on the syntax and semantics of PHP 5.1, a

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Richard Lynch
On Thu, January 4, 2007 6:49 am, Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-04 11:38:58 +: >> Jochem Maas wrote: >> > out of interest, are you logging the result of each request? your >> > probably getting quite a lot of hits to your phpspeed page right >> now >> > - storing the res

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Richard Lynch
On Thu, January 4, 2007 5:28 am, Robert Cummings wrote: > [echo versus print] > Hmmm, something must have changed :) print used to be different from echo. I think there is little or no difference any more. Depends on your PHP version, however. It was a gradual change, with at least 2 increments

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Richard Lynch
On Wed, January 3, 2007 3:43 pm, Roman Neuhauser wrote: > > function print_any($any){ > [34 lines of a switch ellided] > > } > Nice. Now I see how the dynamic nature of PHP boosts development. :) It was intentionally excessive to prove a point. And because copy/pasting the possible values from t

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-04 12:53:14 +: >> Roman Neuhauser wrote: >>> # [EMAIL PROTECTED] / 2007-01-04 12:55:40 +0100: Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-04 11:38:58 +: >> Jochem Maas wrote: >>> out of interest, are you logg

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-04 14:26:11 +0100: > Roman Neuhauser wrote: > >>> How are you going to remove the effect of concurrent requests > >>> for the page from the numbers? > >> why would you want to - it actually make for a more realistic test. > > > > No. > > I'll take that to mean all y

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Robert Cummings
On Thu, 2007-01-04 at 15:34 +0100, Jochem Maas wrote: > Stut wrote: > > Robert Cummings wrote: > >> On Thu, 2007-01-04 at 14:16 +, Roman Neuhauser wrote: > >> > I'm not gonna get a chance to do anything with it today. I'll have a > look tomorrow. > > >>> Do share your nu

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Jochem Maas
Stut wrote: > Robert Cummings wrote: >> On Thu, 2007-01-04 at 14:16 +, Roman Neuhauser wrote: >> I'm not gonna get a chance to do anything with it today. I'll have a look tomorrow. >>> Do share your numbers. My wife does statistics for a living, let's >>> see what she'll

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Stut
Robert Cummings wrote: On Thu, 2007-01-04 at 14:16 +, Roman Neuhauser wrote: I'm not gonna get a chance to do anything with it today. I'll have a look tomorrow. Do share your numbers. My wife does statistics for a living, let's see what she'll have to say. I'm not sure why

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Gregory Beaver
Robert Cummings wrote: > On Thu, 2007-01-04 at 10:54 +, Roman Neuhauser wrote: > >> echo $blah . "\n" is *not* equivalent to printf("%s\n", $blah) >> > > H, could you explain to me how it is different? I would always use > the former unless I specifically needed formatting provided

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Robert Cummings
On Thu, 2007-01-04 at 14:16 +, Roman Neuhauser wrote: > > > I'm not gonna get a chance to do anything with it today. I'll have a > > look tomorrow. > > Do share your numbers. My wife does statistics for a living, let's > see what she'll have to say. I'm not sure why you guys even bother to r

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-04 14:26:11 +0100: >> Roman Neuhauser wrote: > How are you going to remove the effect of concurrent requests > for the page from the numbers? why would you want to - it actually make for a more realistic test. >>> No. >> I'll take

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-04 12:55:40 +0100: >> Roman Neuhauser wrote: >>> # [EMAIL PROTECTED] / 2007-01-04 11:38:58 +: Jochem Maas wrote: > out of interest, are you logging the result of each request? your > probably getting quite a lot of hits to your

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-04 12:53:14 +: > Roman Neuhauser wrote: > > # [EMAIL PROTECTED] / 2007-01-04 12:55:40 +0100: > >> Roman Neuhauser wrote: > >>> # [EMAIL PROTECTED] / 2007-01-04 11:38:58 +: > Jochem Maas wrote: > > out of interest, are you logging the result of each req

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Stut
Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2007-01-04 12:55:40 +0100: > Roman Neuhauser wrote: >> # [EMAIL PROTECTED] / 2007-01-04 11:38:58 +: >>> Jochem Maas wrote: out of interest, are you logging the result of each request? your probably getting quite a lot of hits to your php

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-04 11:38:58 +: >> Jochem Maas wrote: >>> out of interest, are you logging the result of each request? your >>> probably getting quite a lot of hits to your phpspeed page right now >>> - storing the results of everyone's requests is a nice w

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-04 11:38:58 +: > Jochem Maas wrote: > > out of interest, are you logging the result of each request? your > > probably getting quite a lot of hits to your phpspeed page right now > > - storing the results of everyone's requests is a nice way to grab > > extra/free

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-04 12:55:40 +0100: > Roman Neuhauser wrote: > > # [EMAIL PROTECTED] / 2007-01-04 11:38:58 +: > >> Jochem Maas wrote: > >>> out of interest, are you logging the result of each request? your > >>> probably getting quite a lot of hits to your phpspeed page right now >

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Robert Cummings
On Thu, 2007-01-04 at 10:54 +, Roman Neuhauser wrote: > > echo $blah . "\n" is *not* equivalent to printf("%s\n", $blah) H, could you explain to me how it is different? I would always use the former unless I specifically needed formatting provided by printf(), and since there no formatting

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Robert Cummings
On Thu, 2007-01-04 at 11:13 +, Stut wrote: > Robert Cummings wrote: > > On Thu, 2007-01-04 at 10:15 +, Stut wrote: > > > Gregory Beaver wrote: > > >> This is a good example of how the flexibility of PHP can bite > > >> you, but is also a good example of how bad coding adds both > > >> comp

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Stut
Jochem Maas wrote: out of interest, are you logging the result of each request? your probably getting quite a lot of hits to your phpspeed page right now - storing the results of everyone's requests is a nice way to grab extra/free data whilst you pick your nose ;-) I'm not at the moment. I

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Jochem Maas
Stut wrote: > Robert Cummings wrote: >> On Thu, 2007-01-04 at 10:15 +, Stut wrote: >> > Gregory Beaver wrote: >> >> This is a good example of how the flexibility of PHP can bite >> >> you, but is also a good example of how bad coding adds both >> >> complexity and inefficiency to the resulting

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Robert Cummings
On Thu, 2007-01-04 at 12:29 +, Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-04 05:51:12 -0500: > > On Thu, 2007-01-04 at 10:15 +, Stut wrote: > > > Gregory Beaver wrote: > > > > This is a good example of how the flexibility of PHP can bite you, > > > > but is also a good example

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-04 05:51:12 -0500: > On Thu, 2007-01-04 at 10:15 +, Stut wrote: > > Gregory Beaver wrote: > > > This is a good example of how the flexibility of PHP can bite you, > > > but is also a good example of how bad coding adds both complexity and > > > inefficiency to t

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Robert Cummings
On Thu, 2007-01-04 at 11:13 +, Stut wrote: > Robert Cummings wrote: > > On Thu, 2007-01-04 at 10:15 +, Stut wrote: > > > Gregory Beaver wrote: > > >> This is a good example of how the flexibility of PHP can bite > > >> you, but is also a good example of how bad coding adds both > > >> comp

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Stut
Robert Cummings wrote: On Thu, 2007-01-04 at 10:15 +, Stut wrote: > Gregory Beaver wrote: >> This is a good example of how the flexibility of PHP can bite >> you, but is also a good example of how bad coding adds both >> complexity and inefficiency to the resulting software. If f() is >> ca

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-04 05:25:58 -0500: > On Thu, 2007-01-04 at 10:54 +, Roman Neuhauser wrote: > > > > echo $blah . "\n" is *not* equivalent to printf("%s\n", $blah) > > H, could you explain to me how it is different? I would always use > the former unless I specifically needed f

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Robert Cummings
On Thu, 2007-01-04 at 05:51 -0500, Robert Cummings wrote: > On Thu, 2007-01-04 at 10:15 +, Stut wrote: > > Gregory Beaver wrote: > > > This is a good example of how the flexibility of PHP can bite you, > > > but is also a good example of how bad coding adds both complexity and > > > ineffici

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Robert Cummings
On Thu, 2007-01-04 at 10:15 +, Stut wrote: > Gregory Beaver wrote: > > This is a good example of how the flexibility of PHP can bite you, > > but is also a good example of how bad coding adds both complexity and > > inefficiency to the resulting software. If f() is called often, > > there

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Stut
Gregory Beaver wrote: This is a good example of how the flexibility of PHP can bite you, but is also a good example of how bad coding adds both complexity and inefficiency to the resulting software. If f() is called often, there might be a noticeable speedup if it were replaced. I once had

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-04 10:54:58 +: > # [EMAIL PROTECTED] / 2007-01-03 15:18:59 -0600: > > Roman Neuhauser wrote: > > > # [EMAIL PROTECTED] / 2007-01-02 21:23:02 +0100: > > >> there is no mention of try/catch - it seems that the rather unfortunate > > >> word > > >> 'catchable' was us

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-04 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-03 15:18:59 -0600: > Roman Neuhauser wrote: > > # [EMAIL PROTECTED] / 2007-01-02 21:23:02 +0100: > >> David CHANIAL wrote: > >>> We are preparing the upgrade of PHP for our customers, but, after some > >>> tests, > >>> we have a migration "problem" caused by the news

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-03 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-03 16:43:14 +0100: >> Roman Neuhauser wrote: >>> # [EMAIL PROTECTED] / 2007-01-03 14:07:31 +0100: > > BTW, would you share a version of f($any) that meets your definition of > good code? I would suggest adding some sanity checking - a

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-03 Thread Gregory Beaver
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-02 21:23:02 +0100: >> David CHANIAL wrote: >>> We are preparing the upgrade of PHP for our customers, but, after some >>> tests, >>> we have a migration "problem" caused by the news E_RECOVERABLE_ERROR. >>> >>> So, even if the upgrade guide (

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-03 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-03 14:01:29 -0600: > On Wed, January 3, 2007 8:24 am, Roman Neuhauser wrote: > > I don't follow the logic. What did we gain? Can one of those > > "exceptions > > == Java, Java stinks, exceptions stink" campers show me their version > > of > > the below f($any) that wor

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-03 Thread Richard Lynch
On Wed, January 3, 2007 8:24 am, Roman Neuhauser wrote: > I don't follow the logic. What did we gain? Can one of those > "exceptions > == Java, Java stinks, exceptions stink" campers show me their version > of > the below f($any) that works in 5.1 and 5.2? Sure. > > function f($any) > > {

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-03 Thread Robert Cummings
On Wed, 2007-01-03 at 11:57 -0500, Robert Cummings wrote: > On Wed, 2007-01-03 at 17:49 +, Roman Neuhauser wrote: > > if( method_exists( $o, 'f' ) ) > { > $o.f(); That should have been $o->f() btw. Too much JavaScript lately :D Cheers, Rob. -- .-

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-03 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-03 11:57:03 -0500: > Not to get into this argument [...] Nah, just chattin'. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 -- PHP General Mailing L

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-03 Thread Robert Cummings
On Wed, 2007-01-03 at 17:49 +, Roman Neuhauser wrote: > > If you dare to use dynamic features in PHP you're begging to have your > throat cut by some call to undefined method, or hop in to lala land with > an "undefined member variable access" warning... If problems with the > "dynamic typing"

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-03 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-03 16:43:14 +0100: > Roman Neuhauser wrote: > > # [EMAIL PROTECTED] / 2007-01-03 14:07:31 +0100: > >> Roman - you make some very good point but the pragmatist in me > >> says of your first example - why the F*** would anyone pass in an object > >> and > >> blindly pus

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-03 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-03 16:43:14 +0100: > Roman Neuhauser wrote: > > # [EMAIL PROTECTED] / 2007-01-03 14:07:31 +0100: > >> Roman - you make some very good point but the pragmatist in me > >> says of your first example - why the F*** would anyone pass in an object > >> and > >> blindly pus

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-03 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-03 14:07:31 +0100: >> Roman Neuhauser wrote: >>> # [EMAIL PROTECTED] / 2007-01-02 21:23:02 +0100: David CHANIAL wrote: > We are preparing the upgrade of PHP for our customers, but, after some > tests, > we have a migration "p

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-03 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-03 14:07:31 +0100: > Roman Neuhauser wrote: > > # [EMAIL PROTECTED] / 2007-01-02 21:23:02 +0100: > >> David CHANIAL wrote: > >>> We are preparing the upgrade of PHP for our customers, but, after some > >>> tests, > >>> we have a migration "problem" caused by the news

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-03 Thread Jochem Maas
Roman Neuhauser wrote: > # [EMAIL PROTECTED] / 2007-01-02 21:23:02 +0100: >> David CHANIAL wrote: >>> We are preparing the upgrade of PHP for our customers, but, after some >>> tests, >>> we have a migration "problem" caused by the news E_RECOVERABLE_ERROR. >>> >>> So, even if the upgrade guide (

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-03 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-02 21:23:02 +0100: > David CHANIAL wrote: > > We are preparing the upgrade of PHP for our customers, but, after some > > tests, > > we have a migration "problem" caused by the news E_RECOVERABLE_ERROR. > > > > So, even if the upgrade guide (http://www.php.net/UPDATE

Re: [PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-02 Thread Jochem Maas
David CHANIAL wrote: > Hi, > > We are preparing the upgrade of PHP for our customers, but, after some tests, > we have a migration "problem" caused by the news E_RECOVERABLE_ERROR. > > So, even if the upgrade guide (http://www.php.net/UPDATE_5_2.txt) talk about > the method to handle this new e

[PHP] E_RECOVERABLE_ERROR - 5.1.6 to 5.2.0

2007-01-02 Thread David CHANIAL
Hi, We are preparing the upgrade of PHP for our customers, but, after some tests, we have a migration "problem" caused by the news E_RECOVERABLE_ERROR. So, even if the upgrade guide (http://www.php.net/UPDATE_5_2.txt) talk about the method to handle this new errors (by using try/catch), they do