>> errors, you can't just fread the return value. You *need* to change your
>> execution flow based on that error. Therefore, it is exceptional.
>
> That's exactly what I am saying. Exceptions should not be a means of
> flow control, and that's exactly what are you doing here.
I agree that excepti
Hi!
> circumstance. If it's not, you should be checking for existence first
> (via file_exists() or is_readable(), etc)...
This is exactly how we got into this mess with $x =
isset($a['x'])?$a['x']:null;
We're trying to get out of this mess and you're proposing to build
another mess just like th
Levi et al:
On Mon, Aug 6, 2012 at 8:55 PM, Levi Morrison wrote:
> >> Because checking that the returned variable is `!== FALSE` is *way*
> >> better than throwing an exception, right?
> >
> > Yes, it is. You can control it, unlike the exception which you can not,
> > unless, again, you wrap ever
>> Because checking that the returned variable is `!== FALSE` is *way*
>> better than throwing an exception, right?
>
> Yes, it is. You can control it, unlike the exception which you can not,
> unless, again, you wrap everything into try/catch on every kind of
> exception possible.
>
>> This type o
Hi all,
Am 06.08.2012 20:41, schrieb Stas Malyshev:
Hi!
Because checking that the returned variable is `!== FALSE` is *way*
better than throwing an exception, right?
Yes, it is. You can control it, unlike the exception which you can not,
unless, again, you wrap everything into try/catch on e
---
sapi/apache2filter/sapi_apache2.c |3 +++
sapi/apache2handler/mod_php5.c|4
2 files changed, 7 insertions(+)
diff --git a/sapi/apache2filter/sapi_apache2.c
b/sapi/apache2filter/sapi_apache2.c
index 0b51cfb..a8fec5c 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/ap
Hello,
ext/mbstring is very useful, but from my point of view, some functions
are missing.
I would like to propose the addition of the following functions.
mb_append($str, $piece) and mb_prepend($str, $piece):
To add a $piece to, respectively, the end and the start of $string. It
should consi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Am 06.08.2012 20:44, schrieb Stas Malyshev:
> Hi!
>
>> but sometimes you want to be more precise. With exceptions, we
>> have an elegant way to manage all failures as a whole, or to
>> differenciate each reason.
>
> You do not, unless you have 20 exc
On 06/08/12 19:48, Stas Malyshev wrote:
Hi!
Personally, I'm used to what other languages like Python do, and I think
it makes more sense. Exceptions mean you can try/catch the things your
code needs to be prepared for (non-existence, maybe), but other things
No, they mean you need to *always*
Hi!
> Personally, I'm used to what other languages like Python do, and I think
> it makes more sense. Exceptions mean you can try/catch the things your
> code needs to be prepared for (non-existence, maybe), but other things
No, they mean you need to *always* try/catch since you have to means
Hi!
> but sometimes you want to be more precise. With exceptions, we have an
> elegant way to manage all failures as a whole, or to differenciate each
> reason.
You do not, unless you have 20 exception types and catch them all
separately. Which nobody would ever do for one simple reason - what if
Hi!
> Because checking that the returned variable is `!== FALSE` is *way*
> better than throwing an exception, right?
Yes, it is. You can control it, unlike the exception which you can not,
unless, again, you wrap everything into try/catch on every kind of
exception possible.
> This type of thin
On Sat, Aug 4, 2012 at 12:36 AM, Etienne Kneuss wrote:
> On Mon, Jul 30, 2012 at 7:31 PM, Gustavo Lopes wrote:
>> https://wiki.php.net/rfc/incompat_ctx
>>
>> An RFC for deprecating and removing $this from incompatible context.
>>
>> Comments are welcome.
After several explanations with Etienne o
On 06/08/12 08:43, Amaury Bouchard wrote:
2012/8/6 Stas Malyshev
Exceptions are different from PHP errors. For example, if you try to
open a file and the file isn't there, throwing exception is a very
annoying behavior (yes I know some languages do that, IMO it's wrong).
The reason is that it'
Hi:
We have discussed this RFC for a while, and seems no new suggestion
raise up.
previous discussion could be found here:
http://marc.info/?l=php-internals&m=134312917227815&w=2
So, Let's voting for it: https://wiki.php.net/rfc/finally#vote :)
thanks
--
Laruence Xinchen Hui
http://
On Sat, Aug 4, 2012 at 12:40 AM, Andrew Faulds wrote:
> While we're at it,
>
> $a = 'this';
> $$a = new StdClass();
>
> should be an error.
> Also $GLOBALS['this'] = new StdClass();
>
> https://bugs.php.net/bug.php?id=52428
Hehe, I already caught all those executor tricks, like :
http://www.php.n
On Sat, 28 Jul 2012, Ferenc Kovacs wrote:
> On Fri, Mar 18, 2011 at 5:08 PM, Derick Rethans
> wrote:
>
> > On Fri, 18 Mar 2011, Ondřej Surý wrote:
> >
> > > On Thu, Feb 10, 2011 at 13:37, Ondřej Surý wrote:
> > >
> > > > On Thu, Feb 10, 2011, Derick wrote:
> > > >
> > > >> I know it doesn't; I
2012/8/6 Stas Malyshev
> Exceptions are different from PHP errors. For example, if you try to
> open a file and the file isn't there, throwing exception is a very
> annoying behavior (yes I know some languages do that, IMO it's wrong).
> The reason is that it's pretty normal and within normal set
18 matches
Mail list logo