Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload*

2011-08-14 Thread Stas Malyshev
Hi! On 8/14/11 11:21 PM, Sebastian Krebs wrote: I already made an suggestion [1], that bypass this. That suggestion means you can not autoload namespaced function that overrides global function. Major WTF. Also leads to two autoload calls (one most probably resulting in exhaustive include pa

Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload*

2011-08-14 Thread Sebastian Krebs
Hi, 2011/8/15 Stas Malyshev > Hi! > > > On 8/14/11 9:35 PM, Sebastian Krebs wrote: > >> Now I'm getting a little bit confused: About which new/changing >> semantics you are talking about? I want to use custom functions, that >> exists, since the language itself exists, but I want to get rid of >

Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload*

2011-08-14 Thread Stas Malyshev
Hi! On 8/14/11 9:35 PM, Sebastian Krebs wrote: Now I'm getting a little bit confused: About which new/changing semantics you are talking about? I want to use custom functions, that exists, since the language itself exists, but I want to get rid of unnecessary `[include|require]_once()`-calls.

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Laruence
Hi Tjerk: yes, substr_compare can do it, and it also supports negative length argument too. but I am proposal to improve strn(case)cmp, so they are not conflict . :) thanks 2011/8/15 Tjerk Anne Meesters : > Hi, > > Doesn't substr_compare() accomplish the same thing since 5.1.0? > > The o

Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload*

2011-08-14 Thread Sebastian Krebs
Hi, Am 15.08.2011 02:37, schrieb Stas Malyshev: Hi! On 8/14/11 2:50 PM, Sebastian Krebs wrote: I just want to use functions. Whats wrong with that? Really: Thats all. Nothing at all. But changing semantics of the language because somebody doesn't want to use existing semantics doesn't look l

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Sebastian Krebs
Am 14.08.2011 23:52, schrieb Rasmus Lerdorf: On 08/14/2011 02:37 PM, Rasmus Lerdorf wrote: On 08/14/2011 02:03 PM, Stas Malyshev wrote: Hi! On 8/14/11 11:40 AM, Rasmus Lerdorf wrote: My main issue with changing strncmp/strncasecmp is that these are currently exact mappings of the underlying

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Tjerk Anne Meesters
Hi, Doesn't substr_compare() accomplish the same thing since 5.1.0? The only thing I couldn't figure out is how to make it case insensitive without specifying an explicit value to $length Best, Tjerk On Mon, Aug 15, 2011 at 11:18 AM, Laruence wrote: > Hi: >   compare to use substr,   strncm

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Laruence
Hi: compare to use substr, strncmp supporting negative lenght can save a temp variable. thanks 2011/8/15 Rasmus Lerdorf : > On 08/14/2011 02:37 PM, Rasmus Lerdorf wrote: >> On 08/14/2011 02:03 PM, Stas Malyshev wrote: >>> Hi! >>> >>> On 8/14/11 11:40 AM, Rasmus Lerdorf wrote: My main is

Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload*

2011-08-14 Thread Stas Malyshev
Hi! On 8/14/11 2:50 PM, Sebastian Krebs wrote: I just want to use functions. Whats wrong with that? Really: Thats all. Nothing at all. But changing semantics of the language because somebody doesn't want to use existing semantics doesn't look like a good idea to me. PHP has means to do what

Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload

2011-08-14 Thread Ferenc Kovacs
On Mon, Aug 15, 2011 at 12:11 AM, Rasmus Schultz wrote: > Instead of trying to figure out how to autoload functions and cover all your > bases, how about simply adding a __call() magic method? > > That way, each application (or framework) can make their own decisions about > what they're going to

Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload

2011-08-14 Thread Rasmus Schultz
Instead of trying to figure out how to autoload functions and cover all your bases, how about simply adding a __call() magic method? That way, each application (or framework) can make their own decisions about what they're going to autoload and how. A much simpler solution, and one with more pote

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Rasmus Lerdorf
On 08/14/2011 02:37 PM, Rasmus Lerdorf wrote: > On 08/14/2011 02:03 PM, Stas Malyshev wrote: >> Hi! >> >> On 8/14/11 11:40 AM, Rasmus Lerdorf wrote: >>> My main issue with changing strncmp/strncasecmp is that these are >>> currently exact mappings of the underlying libc functions. For people >> >>

Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload*

2011-08-14 Thread Sebastian Krebs
Hi, Am 14.08.2011 23:06, schrieb Stas Malyshev: Hi! On 8/14/11 1:39 PM, Sebastian Krebs wrote: Counterquestion: Why shouldn't I use functions? They exists, they are Because if you want to use functions of similar nature organized in a package, that's what classes are used for. When I must

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Rasmus Lerdorf
On 08/14/2011 02:03 PM, Stas Malyshev wrote: > Hi! > > On 8/14/11 11:40 AM, Rasmus Lerdorf wrote: >> My main issue with changing strncmp/strncasecmp is that these are >> currently exact mappings of the underlying libc functions. For people > > And why should anybody care? 99% of people using PHP

Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload*

2011-08-14 Thread Stas Malyshev
Hi! On 8/14/11 1:39 PM, Sebastian Krebs wrote: Counterquestion: Why shouldn't I use functions? They exists, they are Because if you want to use functions of similar nature organized in a package, that's what classes are used for. You want to do something that goes contrary to how language is

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Stas Malyshev
Hi! On 8/14/11 11:40 AM, Rasmus Lerdorf wrote: My main issue with changing strncmp/strncasecmp is that these are currently exact mappings of the underlying libc functions. For people And why should anybody care? 99% of people using PHP never used a libc function and can hardly tell libc from

Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload*

2011-08-14 Thread Sebastian Krebs
Hi, Am 14.08.2011 15:55, schrieb Derick Rethans: On Sat, 6 Aug 2011, Ferenc Kovacs wrote: I would like to introduce this RFC which would provide function autoloading through the spl_autoload facility without userland BC breakage. https://wiki.php.net/rfc/autofunc I understand the proposal,

Re: [PHP-DEV] [RFC] Choosing a distributed version control system for PHP (or not). Call for Participation.

2011-08-14 Thread Lester Caine
Gwynne Raskind wrote: The only real disadvantage to hg is having to handle python code to maintain > it, people might start converting from PHP;) Although phphgadmin is a start > to improving the php interface support and could be a good start at a fully > PHP managed interface to a PHP repo?

Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload*

2011-08-14 Thread Sebastian Krebs
Hi, Am 14.08.2011 20:17, schrieb Stas Malyshev: Hi! On 8/14/11 7:02 AM, Nikita Popov wrote: As Sebastian already mentioned, if all functions in a namespace are grouped into one file, it would be simple to load that file using such a concept. Why wouldn't you just use a class? Counterquesti

Re: [PHP-DEV] [RFC] Choosing a distributed version control system for PHP (or not). Call for Participation.

2011-08-14 Thread Gwynne Raskind
On Sun, Aug 14, 2011 at 04:18, Lester Caine wrote: > The only real disadvantage to hg is having to handle python code to maintain > it, people might start converting from PHP ;) Although phphgadmin is a start > to improving the php interface support and could be a good start at a fully > PHP manag

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Rasmus Lerdorf
On 08/14/2011 11:26 AM, Stas Malyshev wrote: > Hi! > >>> Maybe, but I would classify *that* as a bug as it makes no sense at all. > > Thinking more about it, something like: > > if(strncasecmp($filename, ".php", -4) === 0) { > /* got php file! */ > } > > seems to me just fine and better than

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Stas Malyshev
Hi! On 8/13/11 5:17 AM, Laruence wrote: Dear all: I am going to close strn(case)cmp supporting negative length vote, since it has been calling for vote near two weeks, and no new feedback I think we need some more time to discuss it. Give it a week, then let's see. -- Stanislav Malyshev

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Stas Malyshev
Hi! Maybe, but I would classify *that* as a bug as it makes no sense at all. Thinking more about it, something like: if(strncasecmp($filename, ".php", -4) === 0) { /* got php file! */ } seems to me just fine and better than doing the same with substr. I would definitely be against the war

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Stas Malyshev
Hi! imo the patch is consistent with how substr works: tyrael@thor:~$ php -d display_errors=1 -d error_reporting=-1 -r 'echo substr("prefix_num", -100);' prefix_num Maybe, but I would classify *that* as a bug as it makes no sense at all. It makes some sense, if you take the meaning of argume

Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload*

2011-08-14 Thread Stas Malyshev
Hi! On 8/14/11 7:02 AM, Nikita Popov wrote: As Sebastian already mentioned, if all functions in a namespace are grouped into one file, it would be simple to load that file using such a concept. Why wouldn't you just use a class? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.su

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Laruence
Hi: sorry, the example is wrong , it should be : thanks 2011/8/14 Laruence : > Hi all internalers: >    Since there comes some new objections,  I think I should open the > RFC voteing again. > >    to Derick,  if I extended voting phase for two weeks ,  can we > consider  this voteing va

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Laruence
Hi all internalers: Since there comes some new objections, I think I should open the RFC voteing again. to Derick, if I extended voting phase for two weeks , can we consider this voteing valid? I think this proposal is not explained clearly before, so I am going to explain it agia

Re: [PHP-DEV] SVN Account Request: aaron1178

2011-08-14 Thread Paul Dragoonis
On Sat, Aug 13, 2011 at 8:14 AM, Aaron Thompson wrote: > I've been using php for along time and want to contribute to the php > world > > The best approach here is to find something that interests you, work on it and send a patch to the mailing list. Only people with a decent amount of contributi

Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload*

2011-08-14 Thread Nikita Popov
On Sun, Aug 14, 2011 at 3:55 PM, Derick Rethans wrote: > I understand the proposal, but I don't see any compelling reasons in the > RFC of why we actually need autoloading for functions? For classes it > makes sense because there is almost always a class to file mapping. For > functions (and const

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Laruence
Hi: I think what I was done is try to describe a image, that we can make follow codes more simple: if (strncmp(substr("num_suffix", 0, -5), "suffix", 5) == 0) { echo "they have the same suffix"; } yes, there is must something not good in my patch, but I think I can tweak it as

Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload*

2011-08-14 Thread Derick Rethans
On Sat, 6 Aug 2011, Ferenc Kovacs wrote: > I would like to introduce this RFC which would provide function > autoloading through the spl_autoload facility without userland BC > breakage. > > https://wiki.php.net/rfc/autofunc I understand the proposal, but I don't see any compelling reasons in th

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Laruence
Hi: this just to say that stncasecmp has the same behavior of either negative or postive length argument. why you insist to this point? as strncmp("", "bbb", 100) works with no warning, why negative length need trigger warnings? thanks 2011/8/14 Derick Rethans : > On Sun, 14 Aug

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Ferenc Kovacs
>> imo the patch is consistent with how substr works: >> tyrael@thor:~$ php -d display_errors=1 -d error_reporting=-1 -r 'echo >> substr("prefix_num", -100);' >> prefix_num > > Maybe, but I would classify *that* as a bug as it makes no sense at all. > I don't mind that, and imho laruence would be

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Derick Rethans
On Sun, 14 Aug 2011, Ferenc Kovacs wrote: > On Sun, Aug 14, 2011 at 1:24 PM, Derick Rethans wrote: > > On Sat, 13 Aug 2011, Laruence wrote: > > > >> Dear all: > >>     I am going to close strn(case)cmp supporting negative length vote, > >> since it has been calling for vote near two weeks, and no

Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload*

2011-08-14 Thread Ferenc Kovacs
On Fri, Aug 12, 2011 at 3:54 PM, Jan Dolecek wrote: > Someone said that it won't be that easy, because functions are > searched within a namespace first and when they don't exist there, > then are called from global namespace. > > Example: > namespace example; > echo substr('Test', 1, 1); > > Whe

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Ferenc Kovacs
On Sun, Aug 14, 2011 at 1:24 PM, Derick Rethans wrote: > On Sat, 13 Aug 2011, Laruence wrote: > >> Dear all: >>     I am going to close strn(case)cmp supporting negative length vote, >> since it has been calling for vote near two weeks, and no new feedback >> . >> >>     the Voting result is: >>  

Re: [PHP-DEV] [RFC] Function autoloading through spl_autoload*

2011-08-14 Thread Sebastian Krebs
Am 12.08.2011 15:54, schrieb Jan Dolecek: Someone said that it won't be that easy, because functions are searched within a namespace first and when they don't exist there, then are called from global namespace. Example: Whats about "both"? - Does \ exists? - Does \ exists? Till here everyt

Re: [PHP-DEV] [VOTE]strn(case)cmp supporting a negative length as its third paramter

2011-08-14 Thread Derick Rethans
On Sat, 13 Aug 2011, Laruence wrote: > Dear all: > I am going to close strn(case)cmp supporting negative length vote, > since it has been calling for vote near two weeks, and no new feedback > . > > the Voting result is: > Support : 6 felipe pajoye pierrick gwynne tyrael laruence >

Re: [PHP-DEV] [RFC] Choosing a distributed version control system for PHP (or not). Call for Participation.

2011-08-14 Thread Lester Caine
Larry Garfield wrote: Submodules may make sense for PHP/PECL. I'm not sure. That would likely take the form of a series of repositories, one for each PECL module, much the way Drupal has for its modules. Then the PHP core repository would include a submodule reference to the PECL modules that