Re: [PHP-DEV] Removing if: endif; syntax

2007-02-05 Thread Brian Moon
Philip Olson wrote: It's also worth mentioning the following historical commit: the 'alternative' syntax is not deprecated Tue Oct 9 23:29:27 2001 UTC (5 years, 3 months ago) by jimw In other words, over five years ago the deprecated status warning was removed from the PHP manual for

Re: [PHP-DEV] Removing if: endif; syntax

2007-02-05 Thread Philip Olson
It's also worth mentioning the following historical commit: the 'alternative' syntax is not deprecated Tue Oct 9 23:29:27 2001 UTC (5 years, 3 months ago) by jimw In other words, over five years ago the deprecated status warning was removed from the PHP manual for this alternative syn

RE: [PHP-DEV] Removing if: endif; syntax

2007-02-05 Thread Andi Gutmans
I think removing it at this stage is really not an option. It doesn't hurt anyone and many find it beneficial inside embedded HTML. Andi > -Original Message- > From: Brian Moon [mailto:[EMAIL PROTECTED] > Sent: Monday, February 05, 2007 9:32 AM > To: internals@lists.php.net > Subject:

RE: [PHP-DEV] FastCGI limit memory

2007-02-05 Thread Andi Gutmans
Don't the FastCGI processes inherit memory limits from their parent? (assuming you're not running standalone FastCGI which almost noone does). Andi > -Original Message- > From: Pierre [mailto:[EMAIL PROTECTED] > Sent: Monday, February 05, 2007 4:54 PM > To: Reinis Rozitis > Cc: interna

Re: [PHP-DEV] FastCGI limit memory

2007-02-05 Thread Pierre
On 2/5/07, Reinis Rozitis <[EMAIL PROTECTED]> wrote: > I'm not sure that you are looking at the right place to solve the > problem. If the leaks are in phpinfo (or in memory allocated by php), > then maybe (really not sure). > > But if the leaks are in IM as their extension does not use php memor

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread Edin Kadribasic
On Feb 6, 2007, at 0:46, Richard Lynch wrote: and they don't even realize that the () doesn't mean what they think it means, and it "just works" because it's a no-op. () is not a no-op. return ($a) vs. return $a could cause PHP to corrupt memory and crash :) Edin -- Edin Kadribasic, Emini

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread Sara Golemon
I would argue that list() (and [] when used like list()) should remain a terminal expression. Yes it's possible to make it non-terminal, but I don't like what the resulting syntax winds up looking like. -Sara Good question. If it's possible to make it behave this way, I don't see why not. On

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread Robert Cummings
On Mon, 2007-02-05 at 17:46 -0600, Richard Lynch wrote: > > On Mon, February 5, 2007 12:05 pm, Stanislav Malyshev wrote: > >> So now we have an invisible operator with a magical symbol '[' which > >> *sometimes* means create an array, but *sometimes* means to > >> de-construct an array into individ

RE: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread Mike Robinson
Richard Lynch wrote: > More edge cases: > > $foo = array(1, 2, 3]; > $bar = [1, 2, 3); > > Syntax error because it's unbalancedO > > Or kosher, because the choice of start/end delimiters should > be up to the user? > > Should it match whatever rule is in place for: > > if (...){ > endif; ec

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread Richard Lynch
More edge cases: $foo = array(1, 2, 3]; $bar = [1, 2, 3); Syntax error because it's unbalancedO Or kosher, because the choice of start/end delimiters should be up to the user? Should it match whatever rule is in place for: if (...){ endif; -- Some people have a "gift" link here. Know what

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 12:05 pm, Stanislav Malyshev wrote: >> So now we have an invisible operator with a magical symbol '[' which >> *sometimes* means create an array, but *sometimes* means to >> de-construct an array into individual variables? > > Yep. We also have an invisible magical oper

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 12:06 pm, Andrei Zmievski wrote: > On Feb 4, 2007, at 8:52 PM, Richard Lynch wrote: > >> E! >> >> So now we have an invisible operator with a magical symbol '[' which >> *sometimes* means create an array, but *sometimes* means to >> de-construct an array into indivi

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 1:18 pm, Andrei Zmievski wrote: > I don't buy the "searching docs is easier" argument. There are plenty > of operators and such that are hard to search for. Yes, and it makes life miserable for some of us... Is that a good reason to extend that misery to yet another opera

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Stanislav Malyshev
Put it this way: Are you willing to answer EVERY PHP-General question asking what this is? ;-) Cuz I'm sure not willing to do it. I'm not willing to answer newbie questions on regular basis, but that has nothing to do with anything - I was unwilling to do it with any syntax. I just think ina

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 12:24 pm, Stanislav Malyshev wrote: > >> When a new PHP user asks you "What is an array?" you will >> understand. > > If someone is not familiar with the concept of the array at all, it > doesn't matter if it's written as array(1,2,3) or [1,2,3]. That's not > what we ar

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Richard Lynch
On Mon, February 5, 2007 12:01 pm, Stanislav Malyshev wrote: >> you, they don't have a clue what they are doing. $a = [1,2,3]; >> would >> not mean jack sqat to those folks. And as stated, finding docs on >> that > > How hard can that be? If one is smart enough to do computer > programming, > how

Re: [PHP-DEV] FastCGI limit memory

2007-02-05 Thread Reinis Rozitis
I'm not sure that you are looking at the right place to solve the problem. If the leaks are in phpinfo (or in memory allocated by php), then maybe (really not sure). But if the leaks are in IM as their extension does not use php memory manage, it is not something fixable by php or anything else b

Re: [PHP-DEV] FastCGI limit memory

2007-02-05 Thread Pierre
Hi, On 2/5/07, Reinis Rozitis <[EMAIL PROTECTED]> wrote: > It will never replace the GD extension. Please read the whole thread > before making conclusions (btw, check out http://www.libgd.org). I didnt mean that way nor as a conclusion, GD is still much faster and so on (but thanks for the lin

Re: [PHP-DEV] FastCGI limit memory

2007-02-05 Thread Reinis Rozitis
It will never replace the GD extension. Please read the whole thread before making conclusions (btw, check out http://www.libgd.org). I didnt mean that way nor as a conclusion, GD is still much faster and so on (but thanks for the link/hint). It was just an excuse why did I play with magickwand

Re: [PHP-DEV] FastCGI limit memory

2007-02-05 Thread Pierre
On 2/5/07, Reinis Rozitis <[EMAIL PROTECTED]> wrote: I'm asking about this just because yesterday while testing MagickWand ( http://www.magickwand.org which according to Thomas Boutell http://marc.theaimsgroup.com/?l=php-dev&m=115698025320619 in some point should replace GD) just by accident di

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Stanislav Malyshev
$a = array( 1, 2, 3 ). It's not hard. I don't think anybody ever argued it's hard to understand. The argument was it's too verbose once you talk about multi-dimensional arrays with a lot of sub-arrays containing in turn even more sub-arrays - entire code becomes packed with repetitions

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Robert Cummings
On Mon, 2007-02-05 at 10:01 -0800, Stanislav Malyshev wrote: > > you, they don't have a clue what they are doing. $a = [1,2,3]; would > > not mean jack sqat to those folks. And as stated, finding docs on that > > How hard can that be? If one is smart enough to do computer programming, > how h

Re: [PHP-DEV] Removing if: endif; syntax

2007-02-05 Thread Robert Cummings
On Mon, 2007-02-05 at 18:36 +0100, Stefan Walk wrote: > Please don't. reads much better than in templates. Says you :) But I don't think it should be removed either. Editor's have no business defining what should and should not be useful in a language. Cheers, Rob. -- .

[PHP-DEV] FastCGI limit memory

2007-02-05 Thread Reinis Rozitis
Hello, is there a chance that this will ever make in PHP5 (or othet future releases) as base feature http://www.zend.com/zend/week/pat/pat48.txt That is besides PHP_FCGI_MAX_REQUESTS to have also the posibility limit the childs max memory usage/leak (PHP_FCGI_MAX_RAM_MB) I'm asking about this

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Brian Moon
Andrei Zmievski wrote: I don't buy the "searching docs is easier" argument. There are plenty of operators and such that are hard to search for. Good point, but, were there pre-existing solutions to those operators when they were created? I think that is the point that Zeev was making. We ha

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Andrei Zmievski
I don't buy the "searching docs is easier" argument. There are plenty of operators and such that are hard to search for. -Andrei On Feb 5, 2007, at 11:07 AM, Brian Moon wrote: If someone is not familiar with the concept of the array at all, it doesn't matter if it's written as array(1,2,3) or

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread Andrei Zmievski
Good question. If it's possible to make it behave this way, I don't see why not. On the other hand, if you take list(), it can't be used in RHS. -Andrei On Feb 5, 2007, at 10:28 AM, Todd Ruth wrote: Would this be legal? function f() { return [ 1, 2 ]; } $x = [ $a, $b ] = f(); In the e

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Brian Moon
If someone is not familiar with the concept of the array at all, it doesn't matter if it's written as array(1,2,3) or [1,2,3]. That's not what we are discussing right now. My point is that if its written array(1,2,3) that have something to search for in the docs. The new proposed syntax remov

Re: [PHP-DEV] Object[] type hint

2007-02-05 Thread Stanislav Malyshev
The check would only be performed in the case where one uses the new type hint. And if someone needs this, he would manually do the same in userspace anyways (see the example in my original mail). I would say (IMHO of course) this belongs to userspace. No reason to build such a complex and r

Re: [PHP-DEV] Object[] type hint

2007-02-05 Thread Sebastian Bergmann
Stanislav Malyshev wrote: > And how this would be verified - each time by passing whole array and > checking each element is an object? I don't think it's a good idea. The check would only be performed in the case where one uses the new type hint. And if someone needs this, he would manually do

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread Todd Ruth
Would this be legal? function f() { return [ 1, 2 ]; } $x = [ $a, $b ] = f(); In the end, would we have...? $a = 1; $b = 2; $x = array(1,2); I'm not trying to be positive or negative about the syntax. I'm just "testing" somewhat edge cases. - Todd On Mon, 2007-02-05 at 10:06 -0800, Andre

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Stanislav Malyshev
When a new PHP user asks you "What is an array?" you will understand. If someone is not familiar with the concept of the array at all, it doesn't matter if it's written as array(1,2,3) or [1,2,3]. That's not what we are discussing right now. Its clear that not all the folks on internals ha

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Brian Moon
Stanislav Malyshev wrote: you, they don't have a clue what they are doing. $a = [1,2,3]; would not mean jack sqat to those folks. And as stated, finding docs on that How hard can that be? If one is smart enough to do computer programming, how hard can it be to know $a=[1,2,3] is an array? L

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread Stanislav Malyshev
So now we have an invisible operator with a magical symbol '[' which *sometimes* means create an array, but *sometimes* means to de-construct an array into individual variables? Yep. We also have an invisible magical operator (), which sometimes means function definition, sometimes means expres

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread Andrei Zmievski
On Feb 4, 2007, at 8:52 PM, Richard Lynch wrote: E! So now we have an invisible operator with a magical symbol '[' which *sometimes* means create an array, but *sometimes* means to de-construct an array into individual variables? That's just disgusting, imho. -1 !!! The way I view [

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Stanislav Malyshev
you, they don't have a clue what they are doing. $a = [1,2,3]; would not mean jack sqat to those folks. And as stated, finding docs on that How hard can that be? If one is smart enough to do computer programming, how hard can it be to know $a=[1,2,3] is an array? Like, what else could it be

Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Andrei Zmievski
I agree. Syntax is good, if we make it work both ways. -Andrei On Feb 4, 2007, at 8:59 AM, Zeev Suraski wrote: My 2c - unless we also make it behave like a list() when in assignment context - I think it will confusing. So I'm +1 if we make it work as both list() and array(), and -1 otherwis

Re: [PHP-DEV] zend_parse_parameters 's!' for NULL string ok?

2007-02-05 Thread Andrei Zmievski
Yes, it does work with 's'. I updated the README. -Andrei On Feb 4, 2007, at 8:24 PM, Michael B Allen wrote: The documentation claims: The following characters also have a meaning in the specifier string: ! - the parameter it follows can be of specified type or NULL (only applies to a,

Re: [PHP-DEV] Object[] type hint

2007-02-05 Thread Stanislav Malyshev
class Example { public function doSomething(Object[] $objects) And how this would be verified - each time by passing whole array and checking each element is an object? I don't think it's a good idea. Also, PHP doesn't have [] as array definition (at least not until Andi's idea i

Re: [PHP-DEV] Removing if: endif; syntax

2007-02-05 Thread Stefan Walk
Please don't. reads much better than in templates. Regards, Stefan -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] Removing if: endif; syntax

2007-02-05 Thread Brian Moon
Reading the array thread, someone mentioned having several ways of doing things. One of their examples was the if: endif; syntax. Forgive me if this has been discussed, but has anyone proposed removing that for PHP6? Seems like the perfect time to do it. Its not recommended. Editors that c

Re: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Brian Moon
Ford, Mike wrote: I don't find: $a = [1 => ['pears', 'apples'], 2 => ['juice', 'oranges']]; any less readable than: $a = array(1 => array('pears', 'apples'), 2 => array('juice', 'oranges')); Quite the opposite actually :) Me too - I go beyond Edin on this one, as I find the array() versio

[PHP-DEV] RE : [PHP-DEV] Re: Named parameters, was Re: Syntactic improvement to array

2007-02-05 Thread P
> From: Christian Schneider [mailto:[EMAIL PROTECTED] > >> Argh! Reading such a line, I think of named parameters, > not an array. > > That's exactly what we are emulating this way ;-) > Our patch is greedy, i.e. it collects as much as possible > into one array. If you want to do this you nee

[PHP-DEV] Re: Named parameters, was Re: Syntactic improvement to array

2007-02-05 Thread Christian Schneider
Richard Quadling wrote: >> Argh! Reading such a line, I think of named parameters, not an array. That's exactly what we are emulating this way ;-) > I agree with Francois here. Other than looking STRONLY like named > parameters, surely there is a flaw if a declaration is ... > > function convert

RE: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Ford, Mike
On 04 February 2007 21:41, Zeev Suraski wrote: > At 23:27 04-02-07, Pierre wrote: > > On 2/4/07, Zeev Suraski <[EMAIL PROTECTED]> wrote: > > > At 20:14 04-02-07, Pierre wrote: > > > > Hi, > > > > > > > > On 2/4/07, Ilia Alshanetsky <[EMAIL PROTECTED]> wrote: > > > > > I personally find array extr

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread Richard Quadling
On 05/02/07, LAUPRETRE François (P) <[EMAIL PROTECTED]> wrote: > From: Christian Schneider [mailto:[EMAIL PROTECTED] > >> - func('foo' => $foo, 'bar' => $bar, ...) equivalent to > >> func(array('foo' => $foo, 'bar' => $bar, ...) Argh! Reading such a line, I think of named parameters, not an ar

RE: [PHP-DEV] [SPAM] Re: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Ford, Mike
On 04 February 2007 18:38, Edin Kadribasic wrote: > Lukas Kahwe Smith wrote: > > Yes, you will come across it if its added. > > I find the Javascript syntax confusing to read as well. However more > > importantly I do not see the point in adding this sugar to save 5 > > chars. > > Nested arrays

RE: [PHP-DEV] Syntactic improvement to array

2007-02-05 Thread Ford, Mike
On 04 February 2007 07:25, Andi Gutmans wrote: > Hi, > > I thought I may have brought this up a long time ago but > couldn't find anything in the archives. > For a long time already I've been thinking about possibly > adding a new syntax for array(...) which would be shorter. I'd suggest > [...].

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread ivailo91
That would be very handy. As I code frequently JavaScript and ActionScript, I will use this feature with pleasure. +2 for me :D The array(), especially for more-than-1 dimensional arrays is very cumbersome. Best Regards, Ivailo Karamanolev On Monday, February 5, 2007, 12:53:44 PM, LAUPRETRE Fra

[PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread P
> From: Christian Schneider [mailto:[EMAIL PROTECTED] > What's also beautiful about [] IMHO is the symmetry of the syntax, > list() and array() are asymmetrical which I always found inferior. Agree. +1 for me, especially for this reason, even after reading Greg's examples :) IMO, it is more i

[PHP-DEV] Re: [Named parameters, was Syntactic improvement to array]

2007-02-05 Thread Christian Schneider
Lukas Kahwe Smith wrote: Named parameters is not just syntax sugar, as they would make it possible to get compiler errors and phpoc support automatically over having to implement some array based solution to trigger errors and some Not 'our' way of named parameters where the main feature is t

[PHP-DEV] RE : [PHP-DEV] RFC extensions_path directive

2007-02-05 Thread P
I agree with Sara. +1 to extend 'extension_dir' :) Do you plan for adding a corresponding set_extension_path/dir() function or will we have to use ini_set() ? And, I certainly should know it, but could somebody explain why the default extensions directory contains this strange 'no-debug-non-zts

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread Lukas Kahwe Smith
Christian Schneider wrote: My personal summary of this thread is: We won't have syntactic sugar for common things like arrays, named parameter emulation and the like ever because it will be killed by the "we already have a way of doing this" and the "you cannot look it up" argument. Shame, tha

Re: [PHP-DEV] Re: Syntactic improvement to array

2007-02-05 Thread Christian Schneider
Richard Lynch wrote: So now we have an invisible operator with a magical symbol '[' which *sometimes* means create an array, but *sometimes* means to de-construct an array into individual variables? The distinction you are making is from an implementation point of view. From a language users p

[PHP-DEV] PHP 5 Bug Summary Report

2007-02-05 Thread internals
PHP 5 Bug Database summary - http://bugs.php.net Num Status Summary (640 total including feature requests) ===[*Compile Issues]== 39372 Suspended Incompatibility in the PHP API. ===[*Configur

[PHP-DEV] time to remove useless dirty hack

2007-02-05 Thread Xuefer
ZendEngine2/zend_compile.c opline->result.op_type = IS_CONST; /* FIXME: Hack so that INIT_FCALL_BY_NAME still knows this is a class */ i checked cvs log (and hardly) find that this hack was for php 5.0-rc/betas, not even used in 5.0. can anyone think about it and change it back to IS_TMP_VAR? it

[PHP-DEV] PHP 4 Bug Summary Report

2007-02-05 Thread internals
PHP 4 Bug Database summary - http://bugs.php.net Num Status Summary (627 total including feature requests) ===[*Network Functions]=== 40351 Open DNS resolution fails with PHP ===[Apache2 rel