Hi,
This patch implements unregister_shutdown_function(), which removes a
function already registered with register_shutdown_function().
It resolves request #53702 (according to google, not sure if it's
still active) and I've thought it a curious absence for a while.
The patch (against trunk)
On 20 June 2011 01:39, Arpad Ray array...@gmail.com wrote:
On Mon, Jun 6, 2011 at 5:31 PM, Richard Quadling rquadl...@gmail.com wrote:
Not an internals expert, but I do have a question.
When would the session handler object be destroyed?
If sessions are being logged to a DB (maybe via a
The constants true, false and null are used very often. Unfortunately, every
usage of either of these constants invokes a constant lookup. There is no
problem with this, constant lookups are fast, but I nevertheless implemented
these constants directly in the lexer to avoid these lookups. I'd be
PHP makes use of the smart string library. I've optimized the
smart_str_append_long() macro in order to save one division per cycle. At
the moment one modulo and one division is used. The optimized version uses
one division (which gets optimized away in most situations) and one
additional
On Mon, 20 Jun 2011, Robert Eisele wrote:
The constants true, false and null are used very often. Unfortunately,
every usage of either of these constants invokes a constant lookup.
There is no problem with this, constant lookups are fast, but I
nevertheless implemented these constants
On Mon, 20 Jun 2011, Robert Eisele wrote:
PHP makes use of the smart string library. I've optimized the
smart_str_append_long() macro in order to save one division per cycle. At
the moment one modulo and one division is used. The optimized version uses
one division (which gets optimized away
Am 20.06.2011 13:00, schrieb Derick Rethans:
Although it's a nice performance increase, I think that breaking
count() as a method name is not a good idea, as I would assume it's
used a lot. Even though count() and strlen() can be optimised that much,
how much does it buy a fully fledged
2011/6/20 Derick Rethans der...@php.net
On Mon, 20 Jun 2011, Robert Eisele wrote:
The constants true, false and null are used very often. Unfortunately,
every usage of either of these constants invokes a constant lookup.
There is no problem with this, constant lookups are fast, but I
Here is the next one.
I think it's quite intuitive to use strtr() to remove single characters of a
string, too, instead of using many str_replace($str, $chr, ). I'd glad to
see this change also in 5.4.
Additionally, I've removed the lookup-table generation as gcc doesn't
optimize this away.
On Mon, 20 Jun 2011, Robert Eisele wrote:
Here is the next one.
I think it's quite intuitive to use strtr() to remove single characters of a
string, too, instead of using many str_replace($str, $chr, ). I'd glad to
see this change also in 5.4.
Do you mean that (the currently documented):
foreach() has many functions, looping over arrays, objects and implementing
the iterator interface. I think it's also quite intuitive to use foreach()
for strings, too.
If you want to implement a parser in PHP, you have to go the way with for +
strlen + substr() or $x[$i] to address one character
On Mon, 2011-06-20 at 07:36 +0100, Arpad Ray wrote:
This patch implements unregister_shutdown_function(), which removes a
function already registered with register_shutdown_function().
It resolves request #53702 (according to google, not sure if it's
still active) and I've thought it a
On Thu, 16 Jun 2011, Stas Malyshev wrote:
3. Add E_STRICT to E_ALL. Nuff said. We did it in 6.0/unicode branch but
didn't backport it.
Not sure about that. Can't we just tell people to use -1 ?
6. Array shortcuts. Make [ 'blah', 'blah' ] work same as array('blah',
'blah'), etc. Does not
On Mon, 20 Jun 2011, Robert Eisele wrote:
foreach() has many functions, looping over arrays, objects and implementing
the iterator interface. I think it's also quite intuitive to use foreach()
for strings, too.
If you want to implement a parser in PHP, you have to go the way with for +
2011/6/20 Derick Rethans der...@php.net
On Mon, 20 Jun 2011, Robert Eisele wrote:
foreach() has many functions, looping over arrays, objects and
implementing
the iterator interface. I think it's also quite intuitive to use
foreach()
for strings, too.
If you want to implement a parser
On Mon, 2011-06-20 at 13:27 +0200, Robert Eisele wrote:
foreach() has many functions, looping over arrays, objects and implementing
the iterator interface. I think it's also quite intuitive to use foreach()
for strings, too.
I would prefer a TextIterator as we had in the old PHP 6 as this
Negative string offsets is a wish and also an implementation of my running
PHP version for long. It operates in the same fashion like substr() with
negative offsets, but avoids the function call and is much smarter if one
single character has to be extracted:
$str = Hallo;
$str[0] == H
$str[-1]
On Mon, 20 Jun 2011, Robert Eisele wrote:
Negative string offsets is a wish and also an implementation of my running
PHP version for long. It operates in the same fashion like substr() with
negative offsets, but avoids the function call and is much smarter if one
single character has to be
On Mon, 20 Jun 2011, Johannes Schlüter wrote:
On Mon, 2011-06-20 at 13:27 +0200, Robert Eisele wrote:
foreach() has many functions, looping over arrays, objects and implementing
the iterator interface. I think it's also quite intuitive to use foreach()
for strings, too.
I would prefer a
On Mon, 20 Jun 2011, Robert Eisele wrote:
2011/6/20 Derick Rethans der...@php.net
On Mon, 20 Jun 2011, Robert Eisele wrote:
foreach() has many functions, looping over arrays, objects and
implementing the iterator interface. I think it's also quite
intuitive to use foreach() for
Hi,
2011/6/20 Robert Eisele rob...@xarg.org
Negative string offsets is a wish and also an implementation of my running
PHP version for long. It operates in the same fashion like substr() with
negative offsets, but avoids the function call and is much smarter if one
single character has to be
Hi Internals,
we have been working on getting an rfc together on how to deal with
votes on rfcs. We aim to provide a simple mechaism for votes while
still maintaining freedom on how to do votes and how to work on rfcs.
I want to move forward on the voting and release RFCs, so we can move
forward
2011/6/20 Johannes Schlüter johan...@schlueters.de:
On Mon, 2011-06-20 at 13:27 +0200, Robert Eisele wrote:
foreach() has many functions, looping over arrays, objects and implementing
the iterator interface. I think it's also quite intuitive to use foreach()
for strings, too.
I would prefer
hi Robert,
I would go with a RFC for that one, at least to document/cover edge
cases to help the doc team to properly document this change if it gets
approved.
Thanks for your work so far!
On Mon, Jun 20, 2011 at 1:27 PM, Robert Eisele rob...@xarg.org wrote:
foreach() has many functions,
On Mon, Jun 20, 2011 at 8:39 PM, Derick Rethans der...@php.net wrote:
8. Cli web server. Built-in mini-HTTP server run directly from PHP binary.
Assigned: Moriyoshi Koizumi
I'd really like to see that one. I thought the patch was already
committed?
Not yet. I'm gonna commit it in six hours
Hi Internals,
We have been working on getting this rfc on how to have clear and
transparent releases process, release cycles and how and which
features get into a release. The RFC is finally ready for the votes.
Therefore we call for votes on the release process RFC.
The RFC can be found here:
On Mon, 20 Jun 2011, Pierre Joye wrote:
Hi Internals,
We have been working on getting this rfc on how to have clear and
transparent releases process, release cycles and how and which
features get into a release. The RFC is finally ready for the votes.
Therefore we call for votes on the
Could I please get an wiki account? I've posted some stuff on the mailing
list, but I think it would be better to document all this stuff on a central
place, also with regard to get these things rated.
Robert
2011/6/17 Lester Caine les...@lsces.co.uk
Sebastian Bergmann wrote:
[...]
Hello
On Jun 20, 2011, at 7:01 AM, Robert Eisele wrote:
Could I please get an wiki account? I've posted some stuff on the mailing
list, but I think it would be better to document all this stuff on a central
place, also with regard to get these things rated.
Greetings Robert,
Considering the
On Mon Jun 20 09:11 AM, Lee davis wrote:
Could we also use current(), next() and key() for iteration of strings?
$string = 'string';
while ($char = current($string))
{
echo key($string) // Would output the offset position I assume 0,1,2
etc??
echo $char // outputs each letter
Hi,
On Mon, Jun 20, 2011 at 13:12, Robert Eisele rob...@xarg.org wrote:
2011/6/20 Derick Rethans der...@php.net
On Mon, 20 Jun 2011, Robert Eisele wrote:
The constants true, false and null are used very often. Unfortunately,
every usage of either of these constants invokes a constant
On Mon, Jun 20, 2011 at 8:30 AM, Derick Rethans der...@php.net wrote:
I am not generally against this RFC, but this point needs to be
discussed first IMO. As having 5 active branches at the same time for
the multiple major releases option is *not* workable.
If its because of the constant
Hi,
On Mon, Jun 20, 2011 at 14:05, Derick Rethans der...@php.net wrote:
On Mon, 20 Jun 2011, Robert Eisele wrote:
Negative string offsets is a wish and also an implementation of my running
PHP version for long. It operates in the same fashion like substr() with
negative offsets, but avoids
Developing PHP runtime
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
Hi,
On Fri, Jun 17, 2011 at 00:08, Stas Malyshev smalys...@sugarcrm.com wrote:
Hi!
Below is the list of the features proposed for inclusion in 5.4, as outlined
in https://wiki.php.net/todo/php54. Please read the TODO page and the RFCs
linked there for details.
This mail is not a vote call
On 20.06.2011 14:02, Robert Eisele wrote:
Negative string offsets is a wish and also an implementation of my running
PHP version for long. It operates in the same fashion like substr() with
negative offsets, but avoids the function call and is much smarter if one
single character has to be
+1, seems useful.
On Mon, Jun 20, 2011 at 8:02 AM, Robert Eisele rob...@xarg.org wrote:
Negative string offsets is a wish and also an implementation of my running
PHP version for long. It operates in the same fashion like substr() with
negative offsets, but avoids the function call and is much
As long as it works on a premise that a string is a byte array and
each element represents 1 byte, +1 from me.
On Mon, Jun 20, 2011 at 7:27 AM, Robert Eisele rob...@xarg.org wrote:
foreach() has many functions, looping over arrays, objects and implementing
the iterator interface. I think it's
-Original Message-
From: Lee davis [mailto:leedavi...@gmail.com]
Sent: Monday, June 20, 2011 9:12 AM
To: Robert Eisele
Cc: internals@lists.php.net
Subject: Re: [PHP-DEV] foreach() for strings
I think this would be quite a useful feature, and am In favor of it.
However, I think
On Mon, 2011-06-20 at 09:28 -0500, dukeofgaming wrote:
On Mon, Jun 20, 2011 at 8:30 AM, Derick Rethans der...@php.net wrote:
I am not generally against this RFC, but this point needs to be
discussed first IMO. As having 5 active branches at the same time for
the multiple major releases
On Mon, 2011-06-20 at 16:31 +0200, Etienne Kneuss wrote:
Negative string offsets is a wish and also an implementation of my running
PHP version for long. It operates in the same fashion like substr() with
negative offsets, but avoids the function call and is much smarter if one
single
I would push this out in two steps. First: Negative string offset and later
range/slice
support for objects and strings. Objects would need a new magic method,
e.g. __slice(),strings need a substr() like interface. I think both are
accessed the
same way, but way are different. The slice support is
Hi,
2011/6/20 Etienne Kneuss col...@php.net
Hi,
On Fri, Jun 17, 2011 at 00:08, Stas Malyshev smalys...@sugarcrm.com
wrote:
Hi!
Below is the list of the features proposed for inclusion in 5.4, as
outlined
in https://wiki.php.net/todo/php54. Please read the TODO page and the
RFCs
I would not consider this for arrays and objects, too. If we had real
arrays, this would make sense but they are HT's and therewith it can also be
explained that -1 is an element and not the end of the chained list behind
the HT.
2011/6/20 Johannes Schlüter johan...@schlueters.de
On Mon,
On Mon, 20 Jun 2011, Felipe Pena wrote:
2011/6/20 Etienne Kneuss col...@php.net
I'd love to see the proposal from Felipe about the improved parse
errors in that list. I believe that the patch was ready or almost
ready? I can't find the RFC though, but maybe the RFC never existed...
On Mon, 2011-06-20 at 17:49 +0200, Robert Eisele wrote:
I would not consider this for arrays and objects, too. If we had real
arrays, this would make sense but they are HT's and therewith it can also be
explained that -1 is an element and not the end of the chained list behind
the HT.
Yes. So
2011/6/20 Johannes Schlüter johan...@schlueters.de
On Mon, 2011-06-20 at 17:49 +0200, Robert Eisele wrote:
I would not consider this for arrays and objects, too. If we had real
arrays, this would make sense but they are HT's and therewith it can also
be
explained that -1 is an element and
Hi!
foreach() has many functions, looping over arrays, objects and implementing
the iterator interface. I think it's also quite intuitive to use foreach()
for strings, too.
I'm not sure how you'd implement such thing, but then I think things
like next(), end(), etc. should work too...
--
From: Ilia Alshanetsky [mailto:i...@prohost.org]
As long as it works on a premise that a string is a byte array and
each element represents 1 byte, +1 from me.
Code written on this premise is almost always bug central when people finally
get around to realizing why they really do need to
Hi!
Negative string offsets is a wish and also an implementation of my running
PHP version for long. It operates in the same fashion like substr() with
negative offsets, but avoids the function call and is much smarter if one
single character has to be extracted:
$str = Hallo;
Sounds OK, but
Hi,
I am new to the list and just got done doing a search through the
archives to try and get an idea on where things stand in regards to
annotation support in PHP. Although I did find some interesting debates,
I was not really able to conclude one way or the other what the plan is.
I've
Hi!
Since we've got voting on the process RFCs finally going on, after much
deliberation we've decided it'd be best to let the votes finish before
the first official 5.4 release. Thus, we decided to postpone 5.4 alpha 1
until June 28th (next Tuesday). The updated schedule is at
Hi!
On 6/20/11 4:39 AM, Derick Rethans wrote:
On Thu, 16 Jun 2011, Stas Malyshev wrote:
3. Add E_STRICT to E_ALL. Nuff said. We did it in 6.0/unicode branch but
didn't backport it.
Not sure about that. Can't we just tell people to use -1 ?
Well, yes, but a) we had it in 6.0 and b) ALL not
Hi!
I'd love to see the proposal from Felipe about the improved parse
errors in that list. I believe that the patch was ready or almost
ready? I can't find the RFC though, but maybe the RFC never existed...
Thanks, missed it. I think based on the discussion and wide acceptance
we could put
Adding to John Crenshaw's list of reasons not to implicitly
treat strings as arrays in foreach loops... Please keep in
mind the following valid code:
$s = 'hello';
foreach ((array)$s as $x) {
var_dump($x);
}
The result is:
string(5) hello
That behavior can be handy. Hopefully, a BC break
Hi!
Here is the next one.
I think it's quite intuitive to use strtr() to remove single characters of a
string, too, instead of using many str_replace($str, $chr, ). I'd glad to
see this change also in 5.4.
This is a BC break, if I understand it correctly, so I don't think it is
a good idea.
Hi!
On 6/20/11 9:57 AM, Todd Ruth wrote:
Iterators are nice. Having a text_string_to_array function
would also be fine. For example:
$s = 'hello';
foreach (text_string_to_array($s) as $x) {
var_dump($x);
}
text_to_array($s) == str_split($s, 1)
--
Stanislav Malyshev, Software
Em Mon, 20 Jun 2011 12:32:30 +0100, Robert Eisele rob...@xarg.org
escreveu:
$demise = strtr(passion, os, );
This is a very bad idea for several reasons:
- strtr already does this with:
$demise = strtr(passion, array(o = , s = ));
- it's a BC break
- adds a *third* operation mode to
Hi!
On 6/20/11 4:12 AM, Robert Eisele wrote:
I think it depends on the experience of the developers. There are many -
halfway ugly - PHP optimization tricks on the net. If these are used, the
difference wouldn't that much. But constructs like for($i=0; $istrlen($x);
$i++) could get optimized
On Mon, 2011-06-20 at 07:11 -0700, Philip Olson wrote:
On Jun 20, 2011, at 7:01 AM, Robert Eisele wrote:
Could I please get an wiki account? I've posted some stuff on the mailing
list, but I think it would be better to document all this stuff on a central
place, also with regard to get
2011/6/20 Stas Malyshev smalys...@sugarcrm.com
Hi!
Negative string offsets is a wish and also an implementation of my running
PHP version for long. It operates in the same fashion like substr() with
negative offsets, but avoids the function call and is much smarter if one
single character
text_to_array($s) == str_split($s, 1)
No, because str_split always splits into 1 byte chunks. text_to_array
would take the character set into account (or that's where the utility
in it would be)...
On Mon, Jun 20, 2011 at 1:06 PM, Stas Malyshev smalys...@sugarcrm.com wrote:
Hi!
On 6/20/11
On Mon, 2011-06-20 at 10:06 -0700, Stas Malyshev wrote:
Hi!
On 6/20/11 9:57 AM, Todd Ruth wrote:
Iterators are nice. Having a text_string_to_array function
would also be fine. For example:
$s = 'hello';
foreach (text_string_to_array($s) as $x) {
var_dump($x);
}
Stas,
Why should it be a BC break? Empty strings are not considered, in any mode
or what feature of strtr() did I miss?
Gustavo,
does you not constradict yourself, when you say it's already available in
the one mode and in the other it shouldn't be? What about the intuitive and
nosy developers
Hi!
On 6/20/11 10:56 AM, Robert Eisele wrote:
Stas,
Why should it be a BC break? Empty strings are not considered, in any mode
or what feature of strtr() did I miss?
Because now strtr(passion, os, ) returns different result.
Combined with the fact that you already can do it with array syntax,
Thanks, Johannes! :) It works.
2011/6/20 Johannes Schlüter johan...@schlueters.de
On Mon, 2011-06-20 at 07:11 -0700, Philip Olson wrote:
On Jun 20, 2011, at 7:01 AM, Robert Eisele wrote:
Could I please get an wiki account? I've posted some stuff on the
mailing
list, but I think it
Le Mon, 20 Jun 2011 14:59:51 +0200, Pierre Joye a écrit :
Hi Internals,
We have been working on getting this rfc on how to have clear and
transparent releases process, release cycles and how and which features
get into a release. The RFC is finally ready for the votes.
Therefore we call
2011/6/2 Patrick ALLAERT patrickalla...@php.net:
Hi,
I would like to introduce an E_NOTICE when an array is silently
converted to a string.
This isn't very useful as it constantly produces the following string:
Array and in most of the case, this is a sign of an error.
Let me know about
I really like the ideas shared here. It's a thing of consideration that
array-functions should also work with strings. Maybe this would be the way
to go, but I'm more excited about the OOP implementation of TextIterator and
ByteIterator, which solves the whole problem at once (and is easier to
On 06/20/2011 08:50 AM, Derick Rethans wrote:
On Mon, 20 Jun 2011, Felipe Pena wrote:
2011/6/20 Etienne Kneusscol...@php.net
I'd love to see the proposal from Felipe about the improved parse
errors in that list. I believe that the patch was ready or almost
ready? I can't find the RFC
Hi,
Apologies for any inconvenience and thank you to those who have already
completed the survey. We will keep the survey open for another couple of
weeks. But, we do hope you will consider responding to the email request
below (sent 2 weeks ago).
Thanks,
Dr. Jeffrey Carver
Assistant Professor
Hi!
On 6/20/11 12:29 PM, Christopher Jones wrote:
If messages are changing, can we feasibly strip the Bison syntax
error, component? The Command line code component is arguably
useless too. Or at least it could be lower cased to command line,
though changing this in php_cli.c may have an
-Original Message-
From: Anthony Ferrara [mailto:ircmax...@gmail.com]
text_to_array($s) == str_split($s, 1)
No, because str_split always splits into 1 byte chunks. text_to_array
would take the character set into account (or that's where the utility
in it would be)...
I think
2011.06.20 21:38 Robert Eisele rašė:
I really like the ideas shared here. It's a thing of consideration that
array-functions should also work with strings. Maybe this would be the way
to go, but I'm more excited about the OOP implementation of TextIterator
and
ByteIterator, which solves the
On Mon, 2011-06-20 at 20:38 +0200, Robert Eisele wrote:
I really like the ideas shared here. It's a thing of consideration that
array-functions should also work with strings. Maybe this would be the way
to go, but I'm more excited about the OOP implementation of TextIterator and
ByteIterator,
On 21/06/11 07:41, Arpad Ray wrote:
I also think once that functionality is there the next request will be
get_registered_shutdown_functions()
or something along the lines.
I don't see of what use that could be.
Completeness? Has that stupid shutdown func been registered?
Fair enough,
2011/6/20 Derick Rethans der...@php.net
On Mon, 20 Jun 2011, Felipe Pena wrote:
2011/6/20 Etienne Kneuss col...@php.net
I'd love to see the proposal from Felipe about the improved parse
errors in that list. I believe that the patch was ready or almost
ready? I can't find the RFC
On 06/20/2011 08:09 PM, Felipe Pena wrote:
I'm ok with this, I just think it's ugly to repeat the token name in
the definition in the .y file. :P
%token T_LNUMBER 'number' (T_LNUMBER)
%token T_STRING 'identifier' (T_STRING)
Why 'identifier' and not 'string' or 'string-literal' there?
Am 20.06.2011 15:30, schrieb Derick Rethans:
I am not generally against this RFC, but this point needs to be
discussed first IMO. As having 5 active branches at the same time for
the multiple major releases option is *not* workable.
I agree.
--
Sebastian Bergmann
79 matches
Mail list logo