You are either purposefully exaggerating or not doing it right.
if(fileop1() && fileop2() && fileop3()) {
// do valid stuff
} else {
// do error stuff
}
It's not that hard.
I guess it was my mistake that I simplified my actual code for simplicity's
sake. Please show me how would my actual cod
Hi!
> Have you stopped for a moment to think this opinion through? Look at two
Of course not. Why would I bother thinking? It is always safe to assume
nobody thinks before writing anything to the list.
> typical patterns of error handling. The examples below are generalized from
> my file cach
The overall mood seems to be that since PHP has an error handler, everyone is
free to handle errors any way they want.
Everyone is surprisingly ignoring the two giant holes in that theory:
1) PHP Errors come with a severity code and a string message. You want to
handle specific errors in a spec
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.
Have you stopped fo
On 2012-08-09 08:42, Nikita Popov wrote:
Without parenthesis their behavior in array definitions and nested
yields is ambigous:
array(yield $key => $value)
// can be either
array((yield $key) => $value)
// or
array((yield $key => $value))
yield yield $key => $value;
// can be either
yield (yie
On 2012-08-09 14:25, Larry Garfield wrote:
On 07/27/2012 07:23 AM, Lester Caine wrote:
Nikita - I am looking for a well reasoned argument as to why generator
has to be added at all! 'Just because it can be' is not a valid
argument, but perhaps you could add to the RFC the performance
implicatio
>
> One question, though: It looks based on the voting like finally {} blocks
> are going in. So... what should happen in the following situation:
>
> function stuff() {
> try {
> foreach (range(1, 100) as $i) {
> yield $i;
> }
> }
> finally {
> print "All done";
> }
> }
On 07/27/2012 07:23 AM, Lester Caine wrote:
Nikita Popov wrote:
I'll ask again since no one has answered ...
>
>In a different way ...
>Is the only thing that changes the 'function' into a 'generator'
replacing
>the call to process the data with 'yield'? ( That would be
'SUSPEND' in an
>SQL p
On 08/08/12 21:43, Stas Malyshev wrote:
Hi!
https://wiki.php.net/rfc/generators#yield_keyword
https://wiki.php.net/rfc/generators#sending_values
I'm not sure $data = (yield $value) makes a lot of sense. Why we have
two variables here? Why it is only operator in the language that
requires pare
Hi!
> https://wiki.php.net/rfc/generators#yield_keyword
> https://wiki.php.net/rfc/generators#sending_values
I'm not sure $data = (yield $value) makes a lot of sense. Why we have
two variables here? Why it is only operator in the language that
requires parentheses around? All these complex paren
On Wed, Aug 8, 2012 at 10:27 PM, Andrew Faulds wrote:
> Hi Nikita,
>
> I notice you require brackets round yield $k => $v and yield $v. Is this the
> formal syntax, i.e. '(' T_YIELD var => var ')'? If so it makes sense in a
> way, but it feels a little hackish. Does yield $v cause some sort of par
On 08/08/12 21:14, Nikita Popov wrote:
On Fri, Jul 27, 2012 at 8:09 PM, Nikita Popov wrote:
5. Are multiple yields allowed? I.e. the rfc mentions something like
yield yield $a - what that would mean? I'd allow yield only be applied
to variable expression (lval) because double yield doesn't make
On Fri, Jul 27, 2012 at 8:09 PM, Nikita Popov wrote:
>> 5. Are multiple yields allowed? I.e. the rfc mentions something like
>> yield yield $a - what that would mean? I'd allow yield only be applied
>> to variable expression (lval) because double yield doesn't make sense to
>> me, but maybe I miss
El 08/08/12 15:38, Pierre Joye escribió:
> hi Chirstian!
>
> Could you please either (or both :) open a bug and attach the patch to
> it or create a pull request please?
I opened a pull request a few minutes ago.,
https://github.com/php/php-src/pull/154
Cheers !
--
PHP Internals - PHP Runti
hi Chirstian!
Could you please either (or both :) open a bug and attach the patch to
it or create a pull request please?
Thanks for your work!
Cheers,
On Mon, Aug 6, 2012 at 11:59 PM, Cristian Rodríguez
wrote:
> ---
> sapi/apache2filter/sapi_apache2.c |3 +++
> sapi/apache2handler/mod_php
On 08/08/2012 10:33 AM, Cristian Rodríguez wrote:
sapi/apache2filter/sapi_apache2.c | 11 +--
sapi/apache2handler/sapi_apache2.c | 12 ++--
2 files changed, 19 insertions(+), 4 deletions(-)
Patches to the mail list are very likely to get lost. It's probably
better to attac
---
sapi/apache2filter/sapi_apache2.c | 11 +--
sapi/apache2handler/sapi_apache2.c | 12 ++--
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/sapi/apache2filter/sapi_apache2.c
b/sapi/apache2filter/sapi_apache2.c
index a8fec5c..21f2fa3 100644
--- a/sapi/apache2
17 matches
Mail list logo