Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-22 Thread Ben Schmidt
It's good for some situations, but there are plenty more where it doesn't cut it, e.g. $_GET[?'foo'] $:= get_default_from_db('foo') $: "hard-coded". Ben. On 23/04/11 12:54 PM, Martin Scotta wrote: what about something like this? $_GET += array( 'key' => 42, 'other' => 'blablah' ); echo

Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-22 Thread Martin Scotta
what about something like this? $_GET += array( 'key' => 42, 'other' => 'blablah' ); echo $_GET [ 'key' ]; and it's already available on you current instalation :) Martin Scotta On Fri, Apr 22, 2011 at 11:27 PM, Ben Schmidt wrote: > On 21/04/11 9:56 AM, Arpad Ray wrote: > >> I must say th

Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-22 Thread Ben Schmidt
What does coalesce() do? If I'm guessing correctly, would proposal #2 that Rune Kaagaard put up solve that for you? https://gist.github.com/909711 Rune's proposal #2, extending func_get_arg(), is impossible to implement/would not work. His proposal #3, which is more like coalesce(), suffers fr

Re: [PHP-DEV] Implicit isset/isempty check on short-ternary operator

2011-04-22 Thread Ben Schmidt
On 21/04/11 9:56 AM, Arpad Ray wrote: I must say that the prospect of yet more new syntax is scary. It really looks like Perl, and I wouldn't have the slightest clue what it meant if I'd missed the release notes. I agree it looks a little bit strange. I think that's partly a benefit: it doesn't

Re: [PHP-DEV] Function proposal: varset

2011-04-22 Thread Ben Schmidt
yeah you are right, passing arguments by reference doesn't trigger the notice, but I'm not sure that it is applicable in our case. Yeah, it wouldn't help. For instance, 42 or "default" can't be passed by reference, so you couldn't actually provide a default value to coalesce() if you implemented

Re: [PHP-DEV] Unmaintained SAPIs

2011-04-22 Thread Rasmus Lerdorf
On 4/22/11 6:08 PM, Johannes Schlüter wrote: apache_hooks We can drop apache_hooks as well. I think I was the only one ever to use it. -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DEV] PHPUnit segfault

2011-04-22 Thread Andras Albert Gyomrey Leal
Hi,Great news, this issue is only happening in PHP 5.3.6. I just compiled 5.3.5 and everything is fine. Please let me know what i can do to help you with this,Andras> From: lgand...@hotmail.com> To: internals@lists.php.net> Date: Fri, 22 Apr 2011 18:43:32 -0400> Subject: [PHP-DEV] PHPUnit segfa

[PHP-DEV] PHPUnit segfault

2011-04-22 Thread Andras Albert Gyomrey Leal
Hi, I'm a bit lost here. Don't know where to go, since PHP 5.3.6 i'm getting random segfaults using PHPUnit. Xdebug disabledPHPUnit 3.5.13CentOS 5.1Linux 2.6.18-028stab070.5 #1 SMP Fri Sep 17 15:37:23 MSD 2010 i686 i686 i386 GNU/LinuxCentOS release 5.6 (Final)Apache 2.2.17 I just want to know

[PHP-DEV] Unmaintained SAPIs

2011-04-22 Thread Johannes Schlüter
Hi, we have quite a few SAPIs where I expect that nobody looked at them for years. Anybody objects from dropping them from trunk? This brings less stuff to document and less confusion for users. I suggest dropping: aolserver caudium continuity milter phttpd pi3web roxen thttpd tux webjames

Re: [PHP-DEV] == Comparison type juggling

2011-04-22 Thread Brian Moon
or strcmp() yeah, strcmp is your friend there. Brian. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] == Comparison type juggling

2011-04-22 Thread Alain Williams
On Fri, Apr 22, 2011 at 10:27:33AM -0400, Matt Pelmear wrote: > My questions are: > 1) What is the advantage to converting both strings to ints to compare them? It makes things easy for working on what comes back from a form (in $_POST/...). It is a nice feature, and works well *most* of the time

[PHP-DEV] == Comparison type juggling

2011-04-22 Thread Matt Pelmear
I'm sure this has probably been covered here in the past, but I've been unable to find a good way to search for it, so I'll just ask. if( '2011020402421730' === '20110204024217300264' ) echo 'BAD'; else echo 'GOOD'; results in "GOOD" being echoed. However, if( '2011020402421730' == '