# [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
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
# [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
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
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
# [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
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
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
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
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
# [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
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
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
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
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
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
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
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
# [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
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
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
# [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
# [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
>
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
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
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
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
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
# [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
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
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
# [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
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
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
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
# [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
# [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
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
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 (
# [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
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)
> > {
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.
--
.-
# [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
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"
# [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
# [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
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
# [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
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 (
# [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
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
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
52 matches
Mail list logo