[PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Patrick ALLAERT
2011/6/17 Stas Malyshev smalys...@sugarcrm.com: [snip] 2. Make primitive type names reserved words (in case we ever want some form of scalar typing or anything else with scalar types). Using them as identifiers would return parse error for now. May have BC implications. I am not sure it is a

Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Sammy Moshe
There's going to be a ton of code in the wild that will break if primitive types become reserved words. On Sun, Jul 10, 2011 at 11:41 AM, Patrick ALLAERT patrickalla...@php.netwrote: 2011/6/17 Stas Malyshev smalys...@sugarcrm.com: [snip] 2. Make primitive type names reserved words (in case

[PHP-DEV] deprecating ext/mysql

2011-07-10 Thread Philip Olson
Greetings PHP geeks, Don't panic! This is not a proposal to add errors or remove this popular extension. Not yet anyway, because it's too popular to do that now. The documentation team is discussing the database security situation, and educating users to move away from the commonly used

Re: [PHP-DEV] deprecating ext/mysql

2011-07-10 Thread Reindl Harald
Am 10.07.2011 19:03, schrieb Philip Olson: What this means to ext/mysql: - Softly deprecate ext/mysql with education (docs) starting today - Not adding E_DEPRECATED errors in 5.4, but revisit for 5.5/6.0 - Add pdo_mysql examples within the ext/mysql docs that mimic the current

Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Nikita Popov
Well, I generally think that PHP should be less strict about reserved keywords. The number of reserved keywords increases with every further release of PHP. For example PHP 5.4 introduces trait and insteadof. PHP 5.3 introduced even more. Every new keyword PHP introduces both breaks old code and

Re: [PHP-DEV] Callable type

2011-07-10 Thread Johannes Schlüter
Hi, On Wed, 2011-06-08 at 12:04 +0200, Johannes Schlüter wrote: Having the behavior cleared I wonder how useful it is in practical terms. A class type hint guarantees me I can do a specific call to methods defined in the class/interface. The proposed type hint tells me I can call it in

Re: [PHP-DEV] [VOTE] 5.4 features vote

2011-07-10 Thread Stas Malyshev
Hi! On 7/9/11 6:47 AM, Laruence wrote: Hi: can we add Foreach supporting T_LIST token into this vote? RFC: https://wiki.php.net/rfc/foreachlist If the author thinks it's mature enough he can put it up to the vote. One aspect I see that is not covered is if the references would work in

[PHP-DEV] Re: Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Stas Malyshev
Hi! On 7/10/11 9:41 AM, Patrick ALLAERT wrote: I'm sure some projects have defined classes with those keywords in some namespace (to ensure they wouldn't conflict with possible PHP built-in stuff) like in: namespace \Types { class Int { // ... } class Float {

Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Stas Malyshev
Hi! On 7/10/11 10:41 AM, Nikita Popov wrote: I don't know whether this is actually possible, but I've at least already seen a patch (http://pear.php.net/~greg/smarter_lexer.patch.txt) for the methodname case linked from a feature request (https://bugs.php.net/bug.php?id=28261). If this patch

Re: [PHP-DEV] Callable type

2011-07-10 Thread Stas Malyshev
Hi! On 7/10/11 12:02 PM, Johannes Schlüter wrote: I can call it in some way. It won't ensure that the signature is compatible with what I expect. Well, it's like array type - you know it's an array but you can't know if it contains certain element that you expect, for example. As I'm not a

RE: [PHP-DEV] deprecating ext/mysql

2011-07-10 Thread Mike Robinson
On July-10-11 1:16 PM Reindl Harald wrote: Am 10.07.2011 19:03, schrieb Philip Olson: What this means to ext/mysql: - Softly deprecate ext/mysql with education (docs) starting today - Not adding E_DEPRECATED errors in 5.4, but revisit for 5.5/6.0 - Add pdo_mysql examples within the

Re: [PHP-DEV] deprecating ext/mysql

2011-07-10 Thread Pierre Joye
hi, As I would love to kill ext/mysql, it is up to the mysql developers to decide. Cheers, On Sun, Jul 10, 2011 at 7:03 PM, Philip Olson phi...@roshambo.org wrote: Greetings PHP geeks, Don't panic! This is not a proposal to add errors or remove this popular extension. Not yet anyway,

Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Pierre Joye
hi, As I could agree on this fact, I can't find any existing project having int(eger), floatco as class, namespaced or not. Do you have any example at hand? Cheers, On Sun, Jul 10, 2011 at 6:41 PM, Patrick ALLAERT patrickalla...@php.net wrote: 2011/6/17 Stas Malyshev smalys...@sugarcrm.com:

Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Ferenc Kovacs
On Sun, Jul 10, 2011 at 11:17 PM, Pierre Joye pierre@gmail.com wrote: hi, As I could agree on this fact, I can't find any existing project having int(eger), floatco as class, namespaced or not. Do you have any example at hand? Cheers,

Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Lars Strojny
Very good find of an inconsistency. Does the testsuite reveal something strange with that patch? Am 10.07.11 19:41 schrieb Nikita Popov unter nikita@googlemail.com: Well, I generally think that PHP should be less strict about reserved keywords. The number of reserved keywords increases with

Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Pierre Joye
ZF and ODM do it and inside namespace. We should be sure that these cases still work, as NS exists for this exact purpose. Cheers, On Sun, Jul 10, 2011 at 11:24 PM, Ferenc Kovacs tyr...@gmail.com wrote: On Sun, Jul 10, 2011 at 11:17 PM, Pierre Joye pierre@gmail.com wrote: hi, As I could

Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Nikita Popov
On Sun, Jul 10, 2011 at 11:37 PM, Lars Strojny l...@strojny.net wrote: Very good find of an inconsistency. Does the testsuite reveal something strange with that patch? I didn't test that patch, just found it in the bugtracker. cel...@php.net would be a better person to ask, as he wrote it.

Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Lars Strojny
Hi everybody, Attached is the patch against current trunk with a testcase, tokenizer tests do not break. If nobody objects, could somebody with commit access to Zend could commit this patch? With regards, Lars Am 10.07.11 23:51 schrieb Nikita Popov unter nikita@googlemail.com: On Sun, Jul

Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Lars Strojny
And again, as .txt Am 11.07.11 00:36 schrieb Lars Strojny unter l...@strojny.net: Hi everybody, Attached is the patch against current trunk with a testcase, tokenizer tests do not break. If nobody objects, could somebody with commit access to Zend could commit this patch? With regards, Lars

Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Felipe Pena
Hi, 2011/7/10 Nikita Popov nikita@googlemail.com: On Sun, Jul 10, 2011 at 11:37 PM, Lars Strojny l...@strojny.net wrote: Very good find of an inconsistency. Does the testsuite reveal something strange with that patch? I didn't test that patch, just found it in the bugtracker.

Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Felipe Pena
2011/7/10 Lars Strojny l...@strojny.net: Hi everybody, Attached is the patch against current trunk with a testcase, tokenizer tests do not break. If nobody objects, could somebody with commit access to Zend could commit this patch? Wait, wait. Tokenizer surely is broken, it will identify a

Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Lars Strojny
Hi Felipe, Am 11.07.11 00:41 schrieb Felipe Pena unter felipe...@gmail.com: I'm against this patch, because we will just add more inconsistency. Allow reserved words in method name, OK. But what about class name/namespace name etc? Good argument, namespace names and class names should be

Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Felipe Pena
Hi, 2011/7/10 Lars Strojny l...@strojny.net: Hi Felipe, Am 11.07.11 00:41 schrieb Felipe Pena unter felipe...@gmail.com: I'm against this patch, because we will just add more inconsistency. Allow reserved words in method name, OK. But what about class name/namespace name etc? Good argument,

[PHP-DEV] sockets broken in 5.4 on Mac OS X

2011-07-10 Thread Stas Malyshev
Hi! I was now building 5.4 on Mac with sockets enabled and got this: /Users/smalyshev/php-5.4/ext/sockets/multicast.c: In function ‘php_if_index_to_addr4’: /Users/smalyshev/php-5.4/ext/sockets/multicast.c:426: error: ‘struct ifreq’ has no member named ‘ifr_ifindex’

Re: [PHP-DEV] sockets broken in 5.4 on Mac OS X

2011-07-10 Thread Scott MacVicar
On Jul 10, 2011, at 4:21 PM, Stas Malyshev wrote: Hi! I was now building 5.4 on Mac with sockets enabled and got this: /Users/smalyshev/php-5.4/ext/sockets/multicast.c: In function ‘php_if_index_to_addr4’: /Users/smalyshev/php-5.4/ext/sockets/multicast.c:426: error: ‘struct ifreq’ has

Re: [PHP-DEV] sockets broken in 5.4 on Mac OS X

2011-07-10 Thread Felipe Pena
Em 10 de julho de 2011 20:21, Stas Malyshev smalys...@sugarcrm.com escreveu: Hi! I was now building 5.4 on Mac with sockets enabled and got this: /Users/smalyshev/php-5.4/ext/sockets/multicast.c: In function ‘php_if_index_to_addr4’: /Users/smalyshev/php-5.4/ext/sockets/multicast.c:426:

Re: [PHP-DEV] sockets broken in 5.4 on Mac OS X

2011-07-10 Thread Stas Malyshev
Hi! On 7/10/11 4:23 PM, Scott MacVicar wrote: The code for this looks really convoluted, I'm thinking we should back out this multicast option for now. It's basically not going to work on OSX the way its implemented from what I can tell. I don't know much about this code (or multicast in

Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long))

2011-07-10 Thread Stas Malyshev
Hi! On 7/10/11 4:07 PM, Felipe Pena wrote: To handle the class name in a method call turn out tricky. For example: include::list(); Agreed, class names would be trouble. Same with any token that can be first in the expression/statement. However, I think methods might be relatively safe, if

Re: [PHP-DEV] sockets broken in 5.4 on Mac OS X

2011-07-10 Thread Scott MacVicar
On Jul 10, 2011, at 4:46 PM, Stas Malyshev wrote: Hi! On 7/10/11 4:23 PM, Scott MacVicar wrote: The code for this looks really convoluted, I'm thinking we should back out this multicast option for now. It's basically not going to work on OSX the way its implemented from what I can tell.

[PHP-DEV] Re: internals Digest 10 Jul 2011 16:41:19 -0000 Issue 2392

2011-07-10 Thread Rasmus Schultz
Hello list, I'd like to share a brief critique of the proposed foreachlist feature - https://wiki.php.net/rfc/foreachlist The argument that this makes code more flexible, is questionable - in my opinion, it makes the code less flexible, since nested arrays have to be nested with their

Re: [PHP-DEV] [VOTE] Object oriented session handlers

2011-07-10 Thread Arpad Ray
Hi, Voting for the Object oriented session handlers RFC is now closed. Results can be found here: https://wiki.php.net/rfc/session-oo/vote The RFC was accepted (22 for, 0 against.) There's a minor change to the patch which I haven't got around to yet (see Felipe's mail on the RFC thread) -

Re: [PHP-DEV] Re: internals Digest 10 Jul 2011 16:41:19 -0000 Issue 2392

2011-07-10 Thread Xinchen Hui
Hi Rasmus: As an shot notation for Foreach( $arr as $ var) { List($foo , $bar) = $var; } I ageer you opinion that using list in Foreach make code hard to rewrite . But this up to php developer? Isn't it? We offer this feature as an optional short way

Re: [PHP-DEV] [VOTE] 5.4 features vote

2011-07-10 Thread Laruence
Hi: okey, I have updated the vote wiki page. thanks 2011/7/11 Stas Malyshev smalys...@sugarcrm.com: Hi! On 7/9/11 6:47 AM, Laruence wrote: Hi:  can we add Foreach supporting T_LIST token into this vote?  RFC: https://wiki.php.net/rfc/foreachlist If the author thinks it's mature