Re: [PHP-DEV] Suggestion: Add optional suffix to tempnam()

2023-07-11 Thread Athos Ribeiro
On Sat, Apr 12, 2014 at 06:33:40AM +, Ferenc Kovacs wrote: On Sat, Apr 12, 2014 at 12:24 AM, Stefan Neufeind wrote: Hi, I'd like to pick up the original discussion about this patch here again. There have some updates on the github-pull. Maybe somebody could have a look into this, please?

Re: [PHP-DEV] Suggestion: Inconsistency: Allow array spread operator to work on string keys

2020-12-03 Thread Côme Chilliet
Le Wed, 2 Dec 2020 17:45:47 +, "G. P. B." a écrit : > The reason why this has been deferred is because of which semantics should > be used for duplicate string keys. ['a' => 1, ...['a' => 2]] should be the same as ['a' => 1, 'a' => 2], I do not see how any other way would be justifiable.

Re: [PHP-DEV] Suggestion: Inconsistency: Allow array spread operator to work on string keys

2020-12-02 Thread Christian Schneider
Am 02.12.2020 um 18:24 schrieb Florian Stascheck : > I suggest to allow string keys to also be used in array literals: > > $template = ['created_at' => time(), 'is_admin' => 1]; > $db_rows = [ > ['name' => 'Alice', 'email' => 'al...@example.org', ...$template], > ['name' => 'Bob', 'email' =>

Re: [PHP-DEV] Suggestion: Inconsistency: Allow array spread operator to work on string keys

2020-12-02 Thread Josh Bruce
> > The reason why this has been deferred is because of which semantics should > be used for duplicate string keys. > > Do we use the addition between two arrays semantics or the array_merge() > semantics? See: https://3v4l.org/7QbWv > > As the previous RFC you linked initially wanted to use

Re: [PHP-DEV] Suggestion: Inconsistency: Allow array spread operator to work on string keys

2020-12-02 Thread Chuck Adams
On Wed, Dec 2, 2020 at 10:46 AM G. P. B. wrote: > The reason why this has been deferred is because of which semantics should > be used for duplicate string keys. > > Do we use the addition between two arrays semantics or the array_merge() > semantics? See: https://3v4l.org/7QbWv array_merge is

Re: [PHP-DEV] Suggestion: Inconsistency: Allow array spread operator to work on string keys

2020-12-02 Thread G. P. B.
On Wed, 2 Dec 2020 at 17:24, Florian Stascheck wrote: > Hello! > > With PHP8 released and the named arguments RFC being implemented, there's > now an inconsistency in how the spread operator works. > > Historically, the spread operator was first used in PHP 5.6 for arguments: > > function

[PHP-DEV] Suggestion: Inconsistency: Allow array spread operator to work on string keys

2020-12-02 Thread Florian Stascheck
Hello! With PHP8 released and the named arguments RFC being implemented, there's now an inconsistency in how the spread operator works. Historically, the spread operator was first used in PHP 5.6 for arguments: function php56($a, $b) { return $a + $b; } $test = [1, 2]; php56(...$test) === 3;

Re: [PHP-DEV] Suggestion: Make all PCRE functions return *character* offsets, rather than *byte* offsets if the modifier `u` (PCRE_UTF8) is given

2020-10-02 Thread Claude Pache
Hi, Working with UTF-8-encoded strings does not implies working with mb_string functions or with code-point counts. Personnally, I work with standard string functions, plus [Grapheme functions] (https://www.php.net/manual/en/ref.intl.grapheme.php

[PHP-DEV] Suggestion: Make all PCRE functions return *character* offsets, rather than *byte* offsets if the modifier `u` (PCRE_UTF8) is given

2020-10-02 Thread Thomas Landauer
Hi, this is a follow-up of a bug I opened, and cmb suggested to continue here: https://bugs.php.net/bug.php?id=80166 Advantages: 1: Easier string manipulation: If somebody does (as in my case) `preg_match_all()` with PREG_OFFSET_CAPTURE, what will they probably use those returned

Re: [PHP-DEV] Suggestion Method Constant

2017-10-13 Thread Mark Randall
On 12/10/2017 22:32, Sara Golemon wrote: answer, but (Foo::class.'::bar') may be what some would expect. Ideally we'd have first-class references to functions. -Sara To chime in.. To my mind, references to functions is the holy grail so far as beginning to clean up the entire ecosystem

Re: [PHP-DEV] Suggestion Method Constant

2017-10-13 Thread Mark Randall
On 12/10/2017 22:32, Sara Golemon wrote: > Ideally we'd have first-class references to functions. > -Sara To chime in.. To my mind, references to functions is the holy grail so far as beginning to clean up the entire ecosystem around function calls. IMHO directly referencing

Re: [PHP-DEV] Suggestion Method Constant

2017-10-13 Thread Niklas Keller
> > I also thought about the same for functions, just to be even more > consistent. > my_func::function I already had the exact same ideas, but didn't propose them yet. $obj::foo::method could be used for instance methods, while Obj::foo::method could be for static methods. Regards, Niklas

Re: [PHP-DEV] Suggestion Method Constant

2017-10-13 Thread Mathias Grimm
I also thought about the same for functions, just to be even more consistent. my_func::function On 12 Oct 2017 23:32, "Sara Golemon" wrote: > On Thu, Oct 12, 2017 at 2:33 PM, Michael Döhler > wrote: > > I am open for any approach, but maybe we have to

Re: [PHP-DEV] Suggestion Method Constant

2017-10-12 Thread Sara Golemon
On Thu, Oct 12, 2017 at 2:33 PM, Michael Döhler wrote: > I am open for any approach, but maybe we have to differentiate between class > constants and method references? > Given the discussion we had around the namespace separator (and why we DIDN'T go with ::), there may

Re: [PHP-DEV] Suggestion Method Constant

2017-10-12 Thread Michael Döhler
Hi, I am open for any approach, but maybe we have to differentiate between class constants and method references? Michael > Am 12.10.2017 um 20:28 schrieb Mathias Grimm : > > The only problem with the @ symbol is the lack of consistency with the other > constants

Re: [PHP-DEV] Suggestion Method Constant

2017-10-12 Thread Michael Döhler
Hi, Same i have in mind, for example: MyClass@myMethod To make also some method call routing easier, e.g. in userland routers. Transform the current approach: $app->get("/foo", [MyClass::class, "myMethod"]); To: $app->get("/foo", MyClass@myMethod); This will ease a lot, e.g. for

Re: [PHP-DEV] Suggestion Method Constant

2017-10-12 Thread Mathias Grimm
The only problem with the @ symbol is the lack of consistency with the other constants class constants are also MyClass::MY_CONST, or MyClass::class, so I think it makes sense to also be MyClass::myMethod::method On 12 October 2017 at 20:24, Michael Döhler wrote: > Hi, >

[PHP-DEV] Suggestion Method Constant

2017-10-12 Thread Mathias Grimm
I would like to suggest a method constant that could be used the same way we use the ::class one I don't have a strong personal preference but it could be something like: MyController::myActionMethod::method, no sure about the internals but it would be consistent with the one for the class.

Re: [PHP-DEV] Suggestion

2016-09-01 Thread Rowan Collins
On 01/09/2016 13:12, Marco Pivetta wrote: Yeah, and I would question: 1. why are you editing with a plaintext editor and searching stuff like that? Are you in a super-hurry? Seems like a 0.001% scenario 2. why do you need to search for functions in a class? Just what kind of monstrous

Re: [PHP-DEV] Suggestion

2016-09-01 Thread Marco Pivetta
On Thu, Sep 1, 2016 at 3:06 AM, Robert Williams wrote: > On Aug 31, 2016, at 11:49, Yasuo Ohgaki wrote: > > > I remember an argument that "function" is useful to "grep functions". > This is true, but we have tokenizer and tokenizer does better job.

Re: [PHP-DEV] Suggestion

2016-08-31 Thread Robert Williams
On Aug 31, 2016, at 11:49, Yasuo Ohgaki wrote: > > I remember an argument that "function" is useful to "grep functions". > This is true, but we have tokenizer and tokenizer does better job. > e.g. It excludes functions inside comments. > > It may be time to consider

Re: [PHP-DEV] Suggestion

2016-08-31 Thread Yasuo Ohgaki
On Mon, Aug 29, 2016 at 10:22 PM, Arvids Godjuks wrote: > As was said, this was debated a lot. Both sides had valid arguments, but > this should not be taken lightly just because there is no "BC break". There > is such thing as too much syntactic sugar, and PHP is one of

Re: [PHP-DEV] Suggestion

2016-08-29 Thread Arvids Godjuks
As was said, this was debated a lot. Both sides had valid arguments, but this should not be taken lightly just because there is no "BC break". There is such thing as too much syntactic sugar, and PHP is one of those, rare these days, languages that keep options of doing the same thing low. On

Re: [PHP-DEV] Suggestion

2016-08-29 Thread Mathias Grimm
Hi, Thanks Seems like is not going to happen very soon :) In fact it is not broken, it's only a cosmetic nice to have. Maybe in the future it will happen. On 29 August 2016 at 14:06, Kalle Sommer Nielsen wrote: > Hi Mathias > > 2016-08-29 15:03 GMT+02:00 Mathias Grimm

Re: [PHP-DEV] Suggestion

2016-08-29 Thread Kalle Sommer Nielsen
Hi Mathias 2016-08-29 15:03 GMT+02:00 Mathias Grimm : > Hi, > I have a suggestion, maybe many gave it before. > > My suggestion is the optional use of the keyword "function" inside classes, > interfaces and traits. > It would look much more clean while removing the

[PHP-DEV] Suggestion

2016-08-29 Thread Mathias Grimm
Hi, I have a suggestion, maybe many gave it before. My suggestion is the optional use of the keyword "function" inside classes, interfaces and traits. It would look much more clean while removing the redundancy. Cheers, Mathias Grimm

Re: [PHP-DEV] Suggestion: Adding PUT, PATCH and DELETE

2015-09-14 Thread Daniel Persson
I've read some of the earlier discussion (not all, require sleep will read more tomorrow). To be clear I don't want to start a naming discussion again. If we have a new name for $_POST or not isn't the main focus of this PR. I want to allow PUT, PATCH and DELETE and handle them the same way as

Re: [PHP-DEV] Suggestion: Adding PUT, PATCH and DELETE

2015-09-14 Thread S.A.N
+1 Yes, it is useful to have in the PHP core. Possible names: $_BODY, $_DATA, $_INPUT, $_REQUEST -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Suggestion: Adding PUT, PATCH and DELETE

2015-09-14 Thread Ryan Pallas
On Mon, Sep 14, 2015 at 3:22 PM, Daniel Persson wrote: > Hi. > > I've not been a member for too long so I might have missed if this have > been discussed earlier. > > But I've created a small PR to the basic request handling to support PUT, > PATCH and DELETE. > >

[PHP-DEV] Suggestion: Adding PUT, PATCH and DELETE

2015-09-14 Thread Daniel Persson
Hi. I've not been a member for too long so I might have missed if this have been discussed earlier. But I've created a small PR to the basic request handling to support PUT, PATCH and DELETE. https://github.com/php/php-src/pull/1519 Summary: Added support for request methods with the smallest

Re: [PHP-DEV] Suggestion: echo function(var)[0];

2010-06-07 Thread Harrison Yuan
Sorry for the ambiguity in my original message, and thanks to Tig for PM-ing me about that. To clarify, I support the syntax for: echo function(var)[0]; and I believe this syntax: $tmp = getimagesize('./path/to/image'); echo $tmp[1]; to be awkward and inconvenient. Furthermore, it feels

Re: [PHP-DEV] Suggestion: echo function(var)[0];

2010-06-07 Thread Felipe Pena
Hi all, 2010/6/5 Felipe Pena felipe...@gmail.com Hi! 2010/6/4 Stas Malyshev smalys...@sugarcrm.com Hi! function call chaining (f()() if f() returns function), and array dereferencing (f()[0]) - (Stas) I did patch for f()() - it's referenced at http://wiki.php.net/rfc/fcallfcall -

Re: [PHP-DEV] Suggestion: echo function(var)[0];

2010-06-05 Thread Harrison Yuan
I don't understand what is holding PHP back from having this syntax. Tig said: ? $tmp = getimagesize('./path/to/image'); echo $tmp[1]; ? The need to assign the trivial variable $tmp first is completely arbitrary. Is it not a design goal somewhere that languages should allow the greatest degree

Re: [PHP-DEV] Suggestion: echo function(var)[0];

2010-06-05 Thread Felipe Pena
Hi! 2010/6/4 Stas Malyshev smalys...@sugarcrm.com Hi! function call chaining (f()() if f() returns function), and array dereferencing (f()[0]) - (Stas) I did patch for f()() - it's referenced at http://wiki.php.net/rfc/fcallfcall - but not for f()[] - didn't have time for that yet.

Re: [PHP-DEV] Suggestion: echo function(var)[0];

2010-06-04 Thread mathieu.suen
Hi Why not something more generic. Someone could think of a ValueNode. Then it could be use for object, array, any primitive type ... I will take the ValueNode as a non terminal grammar node. So first we could do that: ValueNode-method(); ValueNode::sMethod(); ValueNode[]; foo(ValueNode);

Re: [PHP-DEV] Suggestion: echo function(var)[0];

2010-06-04 Thread Richard Quadling
On 4 June 2010 08:18, mathieu.suen mathieu.s...@easyflirt.com wrote: Hi Why not something more generic. Someone could think of a ValueNode. Then it could be use for object, array, any primitive type ... I will take the ValueNode as a non terminal grammar node. So first we could do that:

Re: [PHP-DEV] Suggestion: echo function(var)[0];

2010-06-04 Thread mathieu.suen
On 06/04/2010 10:00 AM, Richard Quadling wrote: On 4 June 2010 08:18, mathieu.suenmathieu.s...@easyflirt.com wrote: Hi Why not something more generic. Someone could think of a ValueNode. Then it could be use for object, array, any primitive type ... I will take the ValueNode as a non

[PHP-DEV] Suggestion: echo function(var)[0];

2010-06-03 Thread Tig
Would be at all possible to implement this kind of shortcut? echo function(var)[0]; For example, to print the height of an image: ? echo getimagesize('./path/to/image')[1]; ? Sure, if you want more than one of the returned array points, this would not be very efficient, however when you do

Re: [PHP-DEV] Suggestion: echo function(var)[0];

2010-06-03 Thread Kalle Sommer Nielsen
Hi Tig 2010/6/4 Tig tigger...@gmail.com: Would be at all possible to implement this kind of shortcut? Its called array-dereferencing and it was proposed countless times, including by myself. There is an RFC for this[1] and it was planned on the old PHP6 todo at the PDT[2]. [1]

Re: [PHP-DEV] Suggestion: echo function(var)[0];

2010-06-03 Thread Tig
On Fri, Jun 4, 2010 at 11:19 AM, Kalle Sommer Nielsen ka...@php.net wrote: Hi Tig 2010/6/4 Tig tigger...@gmail.com: Would be at all possible to implement this kind of shortcut? Its called array-dereferencing and it was proposed countless times, including by myself. There is an RFC for

Re: [PHP-DEV] Suggestion: echo function(var)[0];

2010-06-03 Thread Jonathan Wage
Hi, Has anyone attempted a patch for this? Or does anyone have an idea of the feasibility? Is it technically possible in a good/clean way? - Jon On Thu, Jun 3, 2010 at 9:29 PM, Tig tigger...@gmail.com wrote: On Fri, Jun 4, 2010 at 11:19 AM, Kalle Sommer Nielsen ka...@php.net wrote: Hi Tig

Re: [PHP-DEV] Suggestion: echo function(var)[0];

2010-06-03 Thread Jonathan Wage
Hi, I've always wondered the same thing too. Would be a nice improvement. - Jon On Thu, Jun 3, 2010 at 9:12 PM, Tig tigger...@gmail.com wrote: Would be at all possible to implement this kind of shortcut? echo function(var)[0]; For example, to print the height of an image: ? echo

Re: [PHP-DEV] Suggestion: echo function(var)[0];

2010-06-03 Thread Kalle Sommer Nielsen
2010/6/4 Tig tigger...@gmail.com: On Fri, Jun 4, 2010 at 11:19 AM, Kalle Sommer Nielsen ka...@php.net wrote: So does this mean array-dereferencing was original declined but still a possible for PHP 6? That is how I'm reading it, but just want to make sure. I belive its because when its been

Re: [PHP-DEV] Suggestion: echo function(var)[0];

2010-06-03 Thread Stas Malyshev
Hi! function call chaining (f()() if f() returns function), and array dereferencing (f()[0]) - (Stas) I did patch for f()() - it's referenced at http://wiki.php.net/rfc/fcallfcall - but not for f()[] - didn't have time for that yet. It should not be too hard to do, one just has to be

Re: [PHP-DEV] suggestion about ternary operator

2009-11-22 Thread Lukas Kahwe Smith
On 22.11.2009, at 03:13, D. Dante Lorenso wrote: Lukas Kahwe Smith wrote: On 21.11.2009, at 22:29, Dante Lorenso wrote: I would love to restate my recommendation for the function filled. Which is the opposite of empty. Filled would accept a variable number of arguments and return the first

Re: [PHP-DEV] suggestion about ternary operator

2009-11-21 Thread Lukas Kahwe Smith
On 21.11.2009, at 06:12, Alban wrote: This is not a big problem but if a solution exists, this would be so cool ! Especialy when we have to check existance of twenty or more key in array. Code would be be lighter and clear. Since i use PHP, I always have in my 'common function file' a

Re: [PHP-DEV] suggestion about ternary operator

2009-11-21 Thread Alban
Le Sat, 21 Nov 2009 09:48:10 +0100, Lukas Kahwe Smith a écrit : On 21.11.2009, at 06:12, Alban wrote: This is not a big problem but if a solution exists, this would be so cool ! Especialy when we have to check existance of twenty or more key in array. Code would be be lighter and clear.

Re: [PHP-DEV] suggestion about ternary operator

2009-11-21 Thread Rasmus Lerdorf
Alban wrote: Le Sat, 21 Nov 2009 09:48:10 +0100, Lukas Kahwe Smith a écrit : On 21.11.2009, at 06:12, Alban wrote: This is not a big problem but if a solution exists, this would be so cool ! Especialy when we have to check existance of twenty or more key in array. Code would be be lighter

Re: [PHP-DEV] suggestion about ternary operator

2009-11-21 Thread mm w
More interesting behaviors to dig are there: variable = value1 ?? value2; variable = value0 ? value4 : value1 ?? value2; or a la javascript variable = value1 || value2; Best, On Sat, Nov 21, 2009 at 10:21 AM, Rasmus Lerdorf ras...@lerdorf.com wrote: Alban wrote: Le Sat, 21 Nov 2009

Re: [PHP-DEV] suggestion about ternary operator

2009-11-21 Thread Dante Lorenso
I would love to restate my recommendation for the function filled. Which is the opposite of empty. Filled would accept a variable number of arguments and return the first where empty evaluates as false. Like empty, filled would not throw notices for undefined variables. This is not the same as

Re: [PHP-DEV] suggestion about ternary operator

2009-11-21 Thread Lukas Kahwe Smith
On 21.11.2009, at 22:29, Dante Lorenso wrote: I would love to restate my recommendation for the function filled. Which is the opposite of empty. Filled would accept a variable number of arguments and return the first where empty evaluates as false. Like empty, filled would not throw

Re: [PHP-DEV] suggestion about ternary operator

2009-11-21 Thread D. Dante Lorenso
Lukas Kahwe Smith wrote: On 21.11.2009, at 22:29, Dante Lorenso wrote: I would love to restate my recommendation for the function filled. Which is the opposite of empty. Filled would accept a variable number of arguments and return the first where empty evaluates as false. Like empty, filled

Re: [PHP-DEV] suggestion about ternary operator

2009-11-21 Thread Alban
Le Sat, 21 Nov 2009 10:21:18 -0800, Rasmus Lerdorf a écrit : The ternary isn't meant to solve the isset thing you are talking about. It is simply a shortcut to normal ternary operations. The most common case where you don't know if a variable is set is on the initial input via $_GET or

Re: [PHP-DEV] suggestion about ternary operator

2009-11-21 Thread Rasmus Lerdorf
Alban wrote: Le Sat, 21 Nov 2009 10:21:18 -0800, Rasmus Lerdorf a écrit : The ternary isn't meant to solve the isset thing you are talking about. It is simply a shortcut to normal ternary operations. The most common case where you don't know if a variable is set is on the initial input via

Re: [PHP-DEV] suggestion about ternary operator

2009-11-21 Thread Alban
Le Sat, 21 Nov 2009 19:52:30 -0800, Rasmus Lerdorf a écrit : Or better yet, have your filter function return false if the variable doesn't exist and use the ternary to set the default. You can do it all in a single step then. $var = filter_func($_GET,'foo')?:42; Simple and clean.

[PHP-DEV] suggestion about ternary operator

2009-11-20 Thread Alban
hi all, Since the new conditionnal operator ternary was introduced in php 5.3, I'm little confuse about it. The documentations says : Since PHP 5.3, it is possible to leave out the middle part of the ternary operator. Expression expr1 ?: expr3 returns expr1 if expr1 evaluates to TRUE, and

Re: [PHP-DEV] suggestion about ternary operator

2009-11-20 Thread Larry Garfield
On Friday 20 November 2009 11:12:29 pm Alban wrote: This is not a big problem but if a solution exists, this would be so cool ! Especialy when we have to check existance of twenty or more key in array. Code would be be lighter and clear. I cannot comment on the rest of your post right now,

Re: [PHP-DEV] suggestion about ternary operator

2009-11-20 Thread Alban
Le Fri, 20 Nov 2009 23:28:39 -0600, Larry Garfield a écrit : On Friday 20 November 2009 11:12:29 pm Alban wrote: This is not a big problem but if a solution exists, this would be so cool ! Especialy when we have to check existance of twenty or more key in array. Code would be be lighter and

Re: [PHP-DEV] Suggestion on static field inheritance

2009-05-18 Thread Robin Fernandes
2009/5/16 Jingcheng Zhang dio...@gmail.com: Maybe I have not found its detailed description on PHP's official manual, but PHP does allow static field inheritance. However there is a little difference between dynamic field inheritance and static field inheritance, as the following codes shows:

[PHP-DEV] Suggestion on static field inheritance

2009-05-16 Thread Jingcheng Zhang
Hello all, Maybe I have not found its detailed description on PHP's official manual, but PHP does allow static field inheritance. However there is a little difference between dynamic field inheritance and static field inheritance, as the following codes shows: ?php class static_a { public

Re: [PHP-DEV] Suggestion to increase the max_input_nesting_level

2008-09-10 Thread Rodrigo Saboya
Guilherme Blanco wrote: Hm... Actually at that time I was not able to reproduce the limit, and I wrote a fix that worked well and reduced the number of nest calls. Maybe the guy that notified me was using it. Here is the changeset I did to fix the issue:

Re: [PHP-DEV] Suggestion to increase the max_input_nesting_level

2008-09-09 Thread Derick Rethans
On Mon, 8 Sep 2008, Guilherme Blanco wrote: Yeah... recursion depth. Sorry, I wrongly typed it. I think it may be cleaner now... Well, PHP itself doesn't protect against this, but my guess is that you have Xdebug running. Xdebug limits to 100 levels by default in order to prevent

Re: [PHP-DEV] Suggestion to increase the max_input_nesting_level

2008-09-09 Thread Scott MacVicar
There is no nesting limit, it recurses until it runs out of memory. Derick was saying that XDebug will add one, but other than that there isn't any. dev/php53/sapi/cli/php -r 'function m($m) { echo ++$m . ; m($m); } m(0); ' I ran that and I got bored when it got to 750,000 levels deep. Scott

Re: [PHP-DEV] Suggestion to increase the max_input_nesting_level

2008-09-09 Thread Guilherme Blanco
Hm... Actually at that time I was not able to reproduce the limit, and I wrote a fix that worked well and reduced the number of nest calls. Maybe the guy that notified me was using it. Here is the changeset I did to fix the issue: http://trac.phpdoctrine.org/changeset/4397 But right now I'll

Re: [PHP-DEV] Suggestion to increase the max_input_nesting_level

2008-09-09 Thread Guilherme Blanco
Derick, I do not have xdebug installed here. That's why I thought it was something that could be changed, since it's something too specific and afaik used only by xdebug. Regards, On Tue, Sep 9, 2008 at 3:19 AM, Derick Rethans [EMAIL PROTECTED] wrote: On Mon, 8 Sep 2008, Guilherme Blanco

[PHP-DEV] Suggestion to increase the max_input_nesting_level

2008-09-08 Thread Guilherme Blanco
Hi ML, Short version: Increase the default max_input_nesting_level from 100 to something 150. Extended version: I am working on a Compiler written for PHP. Before you criticize me, let me explain the entire situation. I work for Doctrine project. Currently we're refactoring the DQL (Doctrine

Re: [PHP-DEV] Suggestion to increase the max_input_nesting_level

2008-09-08 Thread Stanislav Malyshev
Hi! Currently I'm working on the compiler, which has this BNF: http://trac.doctrine-project.org/browser/trunk/query-language.txt I've done a lot of optimizations to be able to not touch the default nesting input level, but doing that I added a lot of restrictions that now are my bottlenecks.

Re: [PHP-DEV] Suggestion to increase the max_input_nesting_level

2008-09-08 Thread Guilherme Blanco
Each grammar rule may forward calls and subsequent things to build itself. So, ConditionalExpression may forward a call and later call itself again and again, etc. At last, the number of nested function calls can easily reach 100. If you need an example... I can spend some time on it to

Re: [PHP-DEV] Suggestion to increase the max_input_nesting_level

2008-09-08 Thread Stan Vassilev | FM
Hi, He means recursion depth, not input nesting depth. 5.3 had a proposed fast function call algorithm which would avoid the stack limit and allow deeper recursion, was this accepted and how does it affect the limit of 100 nested calls? Regards, Stan Vassilev Hi! Currently I'm working

Re: [PHP-DEV] Suggestion to increase the max_input_nesting_level

2008-09-08 Thread Guilherme Blanco
Yeah... recursion depth. Sorry, I wrongly typed it. I think it may be cleaner now... On Mon, Sep 8, 2008 at 11:07 PM, Stan Vassilev | FM [EMAIL PROTECTED] wrote: Hi, He means recursion depth, not input nesting depth. 5.3 had a proposed fast function call algorithm which would avoid the

[PHP-DEV] Suggestion for get_headers

2008-03-09 Thread Justin Martin
Hi there, I have a suggestion regarding get_headers, however I do not have a knowledge of C with which to provide a patch. The function get_headers is, as most will know, used to retrieve headers generated by an HTTP request. The primary parameter to this, string $url, is provided

Re: [PHP-DEV] Suggestion: Namespace implementation

2008-01-02 Thread Larry Garfield
On Thursday 27 December 2007, Hans Moog wrote: In my oppinion namespaces should only be an additional way of structering php elements and using short names again without loosing the abilitiy to avoid naming conflicts with 3rd party libraries. Since libraries are generally class libraries and

[PHP-DEV] Suggestion: Namespace implementation

2007-12-27 Thread Hans Moog
Within the last few days i read some of the posts concerning the new namespace implementation and it's alleged problems. And ... I really have to say, that I do not understand whats the problem with namespaces at all. Instead, I suppose that many lost sight of the original goal of namespaces.

[PHP-DEV] Suggestion: Namespace implementation

2007-12-27 Thread Hans Moog
Within the last few days i read some of the posts concerning the new namespace implementation and it's alleged problems. And ... I really have to say, that I do not understand whats the problem with namespaces at all. Instead, I suppose that many lost sight of the original goal of namespaces.

RE: [PHP-DEV] Suggestion for fixing Bug #40928

2007-07-11 Thread Tzachi Tager
- From: Stanislav Malyshev [mailto:[EMAIL PROTECTED] Sent: ג 10 יולי 2007 23:51 To: Tzachi Tager Cc: internals@lists.php.net Subject: Re: [PHP-DEV] Suggestion for fixing Bug #40928 /en-us/ntcmds_shelloverview.mspx?mfr=true , quoting: You can use most characters as variable values, including

Re: [PHP-DEV] Suggestion for fixing Bug #40928

2007-07-10 Thread Stanislav Malyshev
/en-us/ntcmds_shelloverview.mspx?mfr=true , quoting: You can use most characters as variable values, including white space. If you use the special characters , , |, , or ^, you must precede them with the escape character (^) or quotation marks. - So all special characters will be replaced with

Re: [PHP-DEV] Suggestion for fixing Bug #40928

2007-07-06 Thread Frode E. Moe
On Fri, Jul 06, 2007 at 01:29:31 +0300, Tzachi Tager wrote: Hi, I was looking at Bug #40928 - escapeshellarg() does not quote percent (%) correctly for cmd.exe. This bug seems to be because escapeshellarg() in Windows replaces '%' and '' with spaces, while assuming there isn't a real

[PHP-DEV] Suggestion for fixing Bug #40928

2007-07-05 Thread Tzachi Tager
Hi, I was looking at Bug #40928 - escapeshellarg() does not quote percent (%) correctly for cmd.exe. This bug seems to be because escapeshellarg() in Windows replaces '%' and '' with spaces, while assuming there isn't a real escaping method for command line in Windows. Therefore I'm guessing no

Re: [PHP-DEV] suggestion SplFileInfo

2007-03-04 Thread Pierre
On 3/3/07, Marcus Boerger [EMAIL PROTECTED] wrote: Hello Arnold, I added glob directory stream support. Now you can do two things: $d1 = new DirectoryIterator(glob://mydir/*); $d2 = new DirectoryIterator(mydir/*, DirectoryIterator::USE_GLOB); count() stuff will follow. I'm not sure it is

Re: [PHP-DEV] suggestion SplFileInfo

2007-03-04 Thread Pierre
On 3/4/07, Marcus Boerger [EMAIL PROTECTED] wrote: Hello Pierre, Sunday, March 4, 2007, 6:22:03 PM, you wrote: To make this long story short, I do not understand the reason behind a glob:// stream wrapper. It makes no sense. But yes, we need a better glob support in PHP. Many extensions

Re: [PHP-DEV] suggestion SplFileInfo

2007-03-04 Thread Pierre
Hi Marcus, On 3/4/07, Marcus Boerger [EMAIL PROTECTED] wrote: Damn hell i am just sick of getting complaints without even understanding the matters. As you wrote you don't understand. So just stay calm. Damn it! I don'T see it as personal. It is just fucking stupid that you hook onto stuff

Re: [PHP-DEV] suggestion SplFileInfo

2007-03-03 Thread Marcus Boerger
Hello Arnold, a bunch of new stuff based on your suggestions will be added to 5.2.2. I also added more comments below. Tuesday, February 27, 2007, 1:36:21 AM, you wrote: Thanks for your response. I've put some new comments below. SplFileInfo: - Add parameter $flags to constructor. The

Re: [PHP-DEV] suggestion SplFileInfo

2007-03-03 Thread Marcus Boerger
Hello Arnold, I added glob directory stream support. Now you can do two things: $d1 = new DirectoryIterator(glob://mydir/*); $d2 = new DirectoryIterator(mydir/*, DirectoryIterator::USE_GLOB); count() stuff will follow. Best regards, Marcus -- PHP Internals - PHP Runtime Development

[PHP-DEV] RE : [PHP-DEV] suggestion SplFileInfo

2007-02-27 Thread P
From: Arnold Daniels [mailto:[EMAIL PROTECTED] DirectoryIteratorRecursive: - Add flag DIRS_ONLY for the constructor, to only loop through directories This is achieved by a FilterIterator: ParentIterator Yes but if you want to loop recursively through the directories,

[PHP-DEV] suggestion SplFileInfo

2007-02-26 Thread Arnold Daniels
Hi, I've got a few feature suggestions for SplFileInfo and DirectoryIteratorRecursive. I'm creating yet another php file manager. I've noticed that I needed to add quite some code to make it act the way gnome nautilus does. I believe these feature would be a good addition. SplFileInfo: -

Re: [PHP-DEV] suggestion SplFileInfo

2007-02-26 Thread Marcus Boerger
Hello Arnold, some interesting ideas indeed. See my comments below. best regards marcus Monday, February 26, 2007, 8:48:32 PM, you wrote: Hi, I've got a few feature suggestions for SplFileInfo and DirectoryIteratorRecursive. I'm creating yet another php file manager. I've noticed that

Re: [PHP-DEV] suggestion SplFileInfo

2007-02-26 Thread Arnold Daniels
Hi again, Thanks for your response. I've put some new comments below. Marcus Boerger wrote: Hello Arnold, some interesting ideas indeed. See my comments below. best regards marcus Monday, February 26, 2007, 8:48:32 PM, you wrote: Hi, I've got a few feature suggestions for

Re: [PHP-DEV] Suggestion: global variables being accessed in localscope

2007-02-15 Thread Richard Lynch
[Taking this back on-list, as it's my final answer.] On Wed, February 14, 2007 5:30 pm, Christian Schneider wrote: Richard Lynch wrote: But the code that checks for E_NOTICE also has to be altered to check for E_STRICT... How many applications use error handlers. And how many of them rely on

Re: [PHP-DEV] Suggestion: global variables being accessed in localscope

2007-02-10 Thread Richard Lynch
On Thu, February 8, 2007 7:43 pm, Christian Schneider wrote: Guilherme Blanco wrote: Brian,I am sorry about the message indentation... Seems PHP-Internals list does not like M$ Live(r) Mail! Please use plain text mail as your messages are a PITA to read, thanks. Or very easy to read, as

Re: [PHP-DEV] Suggestion: global variables being accessed in localscope

2007-02-09 Thread Derick Rethans
On Fri, 9 Feb 2007, Guilherme Blanco wrote: Christian Schneider wrote: Please use plain text mail as your messages are a PITA to read, thanks. I changed the email to send/recieve messages. Hotmail simply doesn't accept plain text. hotmail also fucks up threading :I regards, Derick --

[PHP-DEV] Suggestion: global variables being accessed in local scope

2007-02-08 Thread Guilherme Blanco
Hello PHP maintainers,During this week, I spoke with Sara Golemon about the possibility to change one current behavior of PHP.My first suggestion, as you can see in my blog post: http://blog.bisna.com/archives/32#comments was a new function called register_superglobal.While talking with her, I

Re: [PHP-DEV] Suggestion: global variables being accessed in local scope

2007-02-08 Thread Brian Moon
Well, this was a little hard to read, but, let me see if I understand one thing. You would have PHP look in the local scope and then also in the global scope? If so, I would never support that idea. I remember an email from Rasmus about why PHP's scoping is the way it is. Something to do

RE: [PHP-DEV] Suggestion: global variables being accessed in local scope

2007-02-08 Thread Guilherme Blanco
PROTECTED] To: [EMAIL PROTECTED] CC: internals@lists.php.net Subject: Re: [PHP-DEV] Suggestion: global variables being accessed in local scope Well, this was a little hard to read, but, let me see if I understand one thing. You would have PHP look in the local scope and then also

Re: [PHP-DEV] Suggestion: global variables being accessed in localscope

2007-02-08 Thread Christian Schneider
Guilherme Blanco wrote: Brian,I am sorry about the message indentation... Seems PHP-Internals list does not like M$ Live(r) Mail! Please use plain text mail as your messages are a PITA to read, thanks. you can see, the only change needed is in a throw-able error (Undefined variable), which

Re: [PHP-DEV] Suggestion: global variables being accessed in localscope

2007-02-08 Thread Guilherme Blanco
Christian Schneider wrote: Please use plain text mail as your messages are a PITA to read, thanks. I changed the email to send/recieve messages. Hotmail simply doesn't accept plain text. You didn't grasp two of the major PHP features (not bugs!): 1. Every variable you access inside a

[PHP-DEV] Suggestion: If URL Loads Initially, then stop

2005-04-13 Thread Ryan Hemelaar
Hi there, I don't know if this is the place to do it, but anyway. I have a suggestion for a new function that PHP could have: It will be similar to fopen, but instead of actually loading the URL, it starts loading the page, then once PHP knows that it's started loading, it will stop it before

RE: [PHP-DEV] Suggestion: If URL Loads Initially, then stop

2005-04-13 Thread David Zülke
http://www.php.net/manual/en/function.get-headers.php - David -Original Message- From: Ryan Hemelaar [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 13, 2005 2:55 PM To: internals@lists.php.net Subject: [PHP-DEV] Suggestion: If URL Loads Initially, then stop Hi there, I

Re: [PHP-DEV] Suggestion: If URL Loads Initially, then stop

2005-04-13 Thread Xuefer
use HEAD request On 4/13/05, Ryan Hemelaar [EMAIL PROTECTED] wrote: Hi there, I don't know if this is the place to do it, but anyway. I have a suggestion for a new function that PHP could have: It will be similar to fopen, but instead of actually loading the URL, it starts loading the

Re: [PHP-DEV] suggestion: empty() with infinite parameters like isset()

2004-10-21 Thread Ron Korving
Wright [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] How about anyempty($var1, $var2, $var3, ...) ? Jevon - Original Message - From: Ron Korving [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, October 21, 2004 12:21 AM Subject: Re: [PHP-DEV] suggestion: empty

Re: [PHP-DEV] suggestion: empty() with infinite parameters like isset()

2004-10-21 Thread Ron Korving
You're right, the only right way would be to introduce a new function like the isval() I suggested in my reply to Jevon. Ron Andi Gutmans [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] There is a big difference between isset() and empty() and it was discussed a lot in the past.

  1   2   >