Hello,
I would like know which itens below needs be backported to 5_3:
- Added runtime JIT auto-globals fetching and caching. (Dmitry, Sara)
- Added "jump label" operator (limited "goto"). (Dmitry, Sara)
- Removed support for "continue" and "break" operators with non-constant
operands. (Dmitry) - Removed undocumented and incomplete support for strings in list()
operator. (Dmitry) - Changed "instanceof" and "catch" operators,
is_a()
and
is_subclass_of()
functions to not call __autoload(). (Dmitry)
Let me know, and then i could post the patch for aprovation.
PS: If is whished be backported a item in NEWS file that i not
mentioned, let know too. :)
--
Regards,
Felipe Pena.
All.
--Jani
Hello,
I would like know which itens below needs be backported to 5_3:
- Added runtime JIT auto-globals fetching and caching. (Dmitry, Sara)
- Added "jump label" operator (limited "goto"). (Dmitry, Sara)
- Removed support for "continue" and "break" operators with non-constant
operands. (Dmitry)- Removed undocumented and incomplete support for strings in list()
operator. (Dmitry)- Changed "instanceof" and "catch" operators,
is_a()
and
is_subclass_of()
functions to not call __autoload(). (Dmitry)Let me know, and then i could post the patch for aprovation.
PS: If is whished be backported a item in NEWS file that i not
mentioned, let know too. :)--
Regards,
Felipe Pena.
--
Patches/Donations: http://pecl.php.net/~jani/
Hi!
- Added runtime JIT auto-globals fetching and caching. (Dmitry, Sara)
Does this change any semantics, etc? Any reason why it wasn't merged in
the first place?
- Added "jump label" operator (limited "goto"). (Dmitry, Sara)
No strong opinion here, I didn't need it anyway :)
- Removed support for "continue" and "break" operators with non-constant
operands. (Dmitry)
I'd wait for 6 with this. May break some scripts.
- Removed undocumented and incomplete support for strings in list()
operator. (Dmitry)
Not sure here. What code does it break?
- Changed "instanceof" and "catch" operators,
is_a()
and
is_subclass_of()
functions to not call __autoload(). (Dmitry)
This definitely should be - there's absolutely no reason any kind on
instanceof-like operator would call autoload.
--
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com
2008/3/26, Stanislav Malyshev stas@zend.com:
- Removed support for "continue" and "break" operators with non-constant
operands. (Dmitry)I'd wait for 6 with this. May break some scripts.
I dont think it will break more a piece of code that doesnt really work. ;)
--
"If debugging is the process of removing bugs, then programming must
be the process of putting them in." – Edsger Dijkstra
I'd wait for 6 with this. May break some scripts.
I dont think it will break more a piece of code that doesnt really work. ;)
Af far as I know, breaks with arguments do work in PHP.
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com
I'd wait for 6 with this. May break some scripts.
I dont think it will break more a piece of code that doesnt really work. ;)
Af far as I know, breaks with arguments do work in PHP.
<?php
$foo = 2;
while(true) {
while(true) {
echo "Hello world!\n";
if (true) {
break $foo;
}
}
echo "Never reached\n";
}
This is what was removed. not normal "break 2;"
-Hannes
Hi,
Hannes Magnusson wrote:
<?php
$foo = 2;
while(true) {
while(true) {
echo "Hello world!\n";
if (true) {
break $foo;
}
}
echo "Never reached\n";
}This is what was removed. not normal "break 2;"
According to Google Code Search (
http://www.google.com/codesearch?q=lang%3Aphp+break\s%2B%24&hl=en&btnG=Search+Code
) there are only two distinct pieces of code out there using dynamic break:
"never heard of" XPath.class.php and "also never heard of" some code deep
inside this Xayara CMS.
Although it seems XPath.class.php is used by some projects (phpmyadmin,
phpgroupware, falbum, lifetype) I checked phpmyadmin and at least in 2.9.1
this class is not included anymore.
On the other hand, dynamic continie only seems to be used in PhpDocumentor:
http://www.google.com/codesearch?hl=en&lr=&q=lang%3Aphp+continue\s%2B%24&btnG=Search
Havent't checked if that one is still used.
- Markus
Hi!
if (true) { break $foo; }
As I understand, this code works now.
"never heard of" XPath.class.php and "also never heard of" some code
deep inside this Xayara CMS.
And used by people. Did I or anybody here on the list actually contacted
with these people or not does not matter - we can't contact millions of
PHP users anyway.
So I think the removal might be held for PHP 6.
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com
"never heard of" XPath.class.php and "also never heard of" some
code deep inside this Xayara CMS.And used by people. Did I or anybody here on the list actually
contacted with these people or not does not matter - we can't
contact millions of PHP users anyway.
So I think the removal might be held for PHP 6.
yeah .. lets keep this kind of cleanup for php6
regards,
Lukas
I'd wait for 6 with this. May break some scripts.
I dont think it will break more a piece of code that doesnt really
work. ;)Af far as I know, breaks with arguments do work in PHP.
And I even used it once...
I could re-factor to work around it in minutes, but there it is...
Just one data-point.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?
Hi!
- Added runtime JIT auto-globals fetching and caching. (Dmitry, Sara)
Does this change any semantics, etc? Any reason why it wasn't merged in
the first place?
It was initially done for the input encoding in head as the runtime
encoding may change after RINIT and inside the script.
By the way, the JIT fetch&de/encode part is still to be done in HEAD.
--
Pierre
http://blog.thepimp.net | http://www.libgd.org
On Wed, Mar 26, 2008 at 5:39 PM, Stanislav Malyshev stas@zend.com
wrote:Hi!
- Added runtime JIT auto-globals fetching and caching. (Dmitry,
Sara)Does this change any semantics, etc? Any reason why it wasn't
merged in
the first place?It was initially done for the input encoding in head as the runtime
encoding may change after RINIT and inside the script.
By the way, the JIT fetch&de/encode part is still to be done in HEAD.
I have added this to the php60 todo list. hope you dont mind that i
put your name behind this item. at the very least you would know what
to do if someone wants to take on this item.
regards,
Lukas
2008/3/26, Stanislav Malyshev stas@zend.com:
- Changed "instanceof" and "catch" operators,
is_a()
and
is_subclass_of()
functions to not call __autoload(). (Dmitry)This definitely should be - there's absolutely no reason any kind on
instanceof-like operator would call autoload.
Hehe, curious... See above.
-
- (PHP_5_1)
-
NEWS
-
ZendEngine2/zend_builtin_functions.c
-
ZendEngine2/zend_compile.c
-
ZendEngine2/zend_compile.h
-
ZendEngine2/zend_execute.h
-
ZendEngine2/zend_execute_API.c
-
ZendEngine2/tests/catch.phpt
-
ZendEngine2/tests/instanceof.phpt
-
ZendEngine2/tests/is_a.phpt:
-
Changed "instanceof" and "catch" operators, `is_a()` and `is_subclass_of()`
-
functions to not call __autoload().
This was done a long time! :D (and is documented about the instanceof)
Hello,
I would like know which itens below needs be backported to 5_3:
- Added runtime JIT auto-globals fetching and caching. (Dmitry, Sara)
Not sure if this has benefits without the encoding stuff which is
planned for PHP 6.
- Added "jump label" operator (limited "goto"). (Dmitry, Sara)
No objection, while it adds yet another keyword.
- Removed support for "continue" and "break" operators with non-constant
operands. (Dmitry)
-1, also just two use cases were found I don't like to break that with
5.3.
- Removed undocumented and incomplete support for strings in list()
operator. (Dmitry)
What exactly does that change?
- Changed "instanceof" and "catch" operators,
is_a()
and
is_subclass_of()
functions to not call __autoload(). (Dmitry)
+1, makes sense.
Let me know, and then i could post the patch for aprovation.
Please do that.
Thanks,
johannes
Hello,
I would like know which itens below needs be backported to 5_3:
- Added runtime JIT auto-globals fetching and caching. (Dmitry, Sara)
Not sure if this has benefits without the encoding stuff which is
planned for PHP 6.
If the JIT is actually enabled by default (as far as I remember it is
not), it can be useful as a request will simply not process any JIT
data if it is not actually used. The current behavior now is to do a
compile time JIT (detection of possible GPCES usage). The encoding is
useless in 5.3 without unicode support, it is binary as we know it ;)
Cheers,
Hello,
I would like know which itens below needs be backported to 5_3:
- Added runtime JIT auto-globals fetching and caching. (Dmitry, Sara)
Not sure if this has benefits without the encoding stuff which is
planned for PHP 6.If the JIT is actually enabled by default (as far as I remember it is
not), it can be useful as a request will simply not process any JIT
data if it is not actually used. The current behavior now is to do a
compile time JIT (detection of possible GPCES usage). The encoding is
useless in 5.3 without unicode support, it is binary as we know it ;)
And compile time JIT is fine as long as we don't have to care for
encoding, right? So this change won't be needed in 5.3.
johannes
And compile time JIT is fine as long as we don't have to care for
encoding, right? So this change won't be needed in 5.3.
Except when one sends a xxMB post that you are not expecting and will
not use. But that has been so for years, too bad though, 5.3 is the
perfect time for such thing.
--
Pierre
http://blog.thepimp.net | http://www.libgd.org
And compile time JIT is fine as long as we don't have to care for
encoding, right? So this change won't be needed in 5.3.Except when one sends a xxMB post that you are not expecting and will
not use. But that has been so for years, too bad though, 5.3 is the
perfect time for such thing.
which is handled by post_max_filesize and as long as we don't add error
handling it doesn't make a difference if that happens at compile- or
runtime.
johannes
And compile time JIT is fine as long as we don't have to care for
encoding, right? So this change won't be needed in 5.3.Except when one sends a xxMB post that you are not expecting and will
not use. But that has been so for years, too bad though, 5.3 is the
perfect time for such thing.which is handled by post_max_filesize and as long as we don't add error
handling it doesn't make a difference if that happens at compile- or
runtime.
Indeed it makes a difference. In one case it is always initialized, in
the other only if it is actually used (and not only if a
_GET/_POST... exists in the script). That's a pretty big difference.
--
Pierre
http://blog.thepimp.net | http://www.libgd.org
2008/3/26, Johannes Schlüter johannes@php.net:
- Added "jump label" operator (limited "goto"). (Dmitry, Sara)
No objection, while it adds yet another keyword.
Patch:
Patch full (with re2c regenerated files):
2008/3/26, Johannes Schlüter johannes@php.net:
- Added "jump label" operator (limited "goto"). (Dmitry, Sara)
No objection, while it adds yet another keyword.
Patch:
Patch full (with re2c regenerated files):
This should definitely go into 5_3, please commit.
-Hannes
Em Sex, 2008-03-28 às 12:58 +0100, Hannes Magnusson escreveu:
2008/3/26, Johannes Schlüter johannes@php.net:
- Added "jump label" operator (limited "goto"). (Dmitry, Sara)
No objection, while it adds yet another keyword.
Patch:
Patch full (with re2c regenerated files):
This should definitely go into 5_3, please commit.
-Hannes
Commited!
--
Regards,
Felipe Pena.
2008/3/26, Johannes Schlüter johannes@php.net:
- Removed undocumented and incomplete support for strings in list()
operator. (Dmitry)What exactly does that change?
$a = "foo"; list($b) = $a; var_dump($b);
Before:
string(1) "f"
After (HEAD):
NULL
Em Qua, 2008-03-26 às 23:43 -0300, Felipe Pena escreveu:
2008/3/26, Johannes Schlüter johannes@php.net:
- Removed undocumented and incomplete support for strings in list()
operator. (Dmitry)What exactly does that change?
$a = "foo"; list($b) = $a; var_dump($b);
Before:
string(1) "f"After (HEAD):
NULL
Hmm, is that being used anywhere at the planet? :D
Anyway...
Patch: http://felipe.ath.cx/diff/list.diff
--
Regards,
Felipe Pena.
What exactly does that change?
$a = "foo"; list($b) = $a; var_dump($b);
This is weird... I wouldn't go as far as saying nobody uses it - since
experience shows there's somebody somewhere using any weird combination
of PHP features imaginable - but it's definitely a strange code. Even
though, I think since it's functionality drop, we may want to wait with
it, unless it doesn't work anyway (e.g. produces segfaults in some cases).
--
Stanislav Malyshev, Zend Software Architect
stas@zend.com http://www.zend.com/
(408)253-8829 MSN: stas@zend.com
What exactly does that change?
$a = "foo"; list($b) = $a; var_dump($b);
This is weird... I wouldn't go as far as saying nobody uses it - since
experience shows there's somebody somewhere using any weird combination
of PHP features imaginable - but it's definitely a strange code. Even
though, I think since it's functionality drop, we may want to wait with
it, unless it doesn't work anyway (e.g. produces segfaults in some cases).
I agree.
Any functionality removal, no matter how wtf it might be, shouldn't be merged.
If we could however throw E_DEPRECATED
there, that would be great.
-Hannes
2008/3/28, Hannes Magnusson hannes.magnusson@gmail.com:
I agree.
Any functionality removal, no matter how wtf it might be, shouldn't be merged.
If we could however throwE_DEPRECATED
there, that would be great.
I guess an E_WARNING
is more appropiate
Warning : "list() only works on numerical arrays and assumes the
numerical indices start at 0. "
in case of
a) $a is not an array
b) array index is not numeric
b) the array index does not start at 0...
--
"If debugging is the process of removing bugs, then programming must
be the process of putting them in." – Edsger Dijkstra
On Fri, Mar 28, 2008 at 2:58 PM, Cristian Rodriguez
judas.iscariote@gmail.com wrote:
2008/3/28, Hannes Magnusson hannes.magnusson@gmail.com:
I agree.
Any functionality removal, no matter how wtf it might be, shouldn't be merged.
If we could however throwE_DEPRECATED
there, that would be great.I guess an
E_WARNING
is more appropiate
E_DEPRECATED
is meant for functionality that will be removed in the
future, exactly what will happen with this "feature" in 6.
-Hannes
Stanislav Malyshev wrote:
This is weird... I wouldn't go as far as saying nobody uses it - since
experience shows there's somebody somewhere using any weird combination
of PHP features imaginable - but it's definitely a strange code. Even
though, I think since it's functionality drop, we may want to wait with
it, unless it doesn't work anyway (e.g. produces segfaults in some cases).
Did a little poking around. The only gotcha seems to be that the feature
doesn't work when used with a literal string:
list($b) = 'asdf'; // $b is NULL
--
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier http://htmlpurifier.org Anti-XSS Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
2008/3/30, Edward Z. Yang edwardzyang@thewritingpot.com:
list($b) = 'asdf'; // $b is
NULL
yep, that does not work, and should IMHO emit the warning I mentioned
in a previuos email... ;)
--
"If debugging is the process of removing bugs, then programming must
be the process of putting them in." – Edsger Dijkstra
So what is the conclusion here?
- Added runtime JIT auto-globals fetching and caching. (Dmitry, Sara)
backport (based on the arguments from Pierre)
- Added "jump label" operator (limited "goto"). (Dmitry, Sara)
backport
- Removed support for "continue" and "break" operators with non-
constant
operands. (Dmitry)
dont backport
- Removed undocumented and incomplete support for strings in list()
operator. (Dmitry)
dont backport
- Changed "instanceof" and "catch" operators,
is_a()
and
is_subclass_of()
functions to not call __autoload(). (Dmitry)
backport (or actually this was changed in 5.1 already)
regards,
Lukas