Re: [PHP-DEV] Return type hints

2008-04-08 Thread Arvids Godjuks
Em, you have __call method in classes - via it you could implement ANY logic for overloading. It's written in manual here: http://www.php.net/manual/en/language.oop5.overloading.php KISS should be followed - no C++ style overloading is needed, PHP is a script language without strict type hinting.

Re: [PHP-DEV] Return type hints

2008-04-08 Thread Arvids Godjuks
Yes it does, and not only for VB developers. I'm plain PHP developer (with some small Pascal and Delphi background) and I faced quite a lot situations when named parameters would give me a lot. In stead had to write some nasty code like myFunc($param1, $param2, array(), null, $paramX); myFunc($par

Re: [PHP-DEV] Return type hints

2008-04-08 Thread Christian Schneider
Actually nothing could support my point about giving the wrong signals better than these two postings: They are IMHO on the wrong track on how to make an interface better. Krister Karlström wrote: > This is maybe getting a bit out of topic now, but what about > function/method overloading using ty

Re: [PHP-DEV] Small test case fixes / observations (php-5.2.6_rc4)

2008-04-08 Thread Christian Hoffmann
On 2008-04-06 23:44, Christian Hoffmann wrote: Heya, while building and testing a minimal version of PHP and as such disabling the session extension, I discovered that ext/standard/tests/general_functions/bug44394_2.phpt fails without the session extension being enabled. I created a patch to

Re: [PHP-DEV] Return type hints

2008-04-08 Thread Krister Karlström
Yes indeed you can implement it using the __call method, but it would be more readable if the language structure itself would support it. I suggested this just because I think that this is the most common way of using overloading, thus this probably would make sense to lot of users out there.

Re: [PHP-DEV] Return type hints

2008-04-08 Thread Krister Karlström
Hi! This is maybe getting a bit out of topic now, but what about function/method overloading using type hinting: function myfunc(string $data) { } function myfunc(int $data) { } function myfunc(myClass $data) { } This currently causes an error in PHP 5.2.5 that function myfunc() can't be red

Re: [PHP-DEV] Return type hints

2008-04-08 Thread Arvids Godjuks
I think type hint's would be good optional functionality. Those who need will use it, others will not. I'd probably use it in some cases. Especially if named parameters are implemented. Sometimes what I really want is named parameter pass like function myfunc(array $array, string $string = null,

Re: [PHP-DEV] intl naming

2008-04-08 Thread Pierre Joye
Hi Stan, Andi and al! On Fri, Apr 4, 2008 at 11:59 PM, Andi Gutmans <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: Pierre Joye [mailto:[EMAIL PROTECTED] > > Sent: Friday, April 04, 2008 12:33 PM > > To: Stas Malyshev > > Cc: Lester Caine; PHP internals > > > Subject: Re: [

[PHP-DEV] Re: testfest

2008-04-08 Thread Elizabeth M Smith
Ligaya Turmelle wrote: > I wish to help with the testfest. Lukas told me to start asking some > questions in here. So to help organize things I will add this > information to the testfest wiki page and if you want pass on any > changes for the testfest web page (or you can give me cvs access if yo

Re: [PHP-DEV] Inclusion of PHP LiteSpeed SAPI in the standard PHP distribution?

2008-04-08 Thread George Wang
Hi Johannes, Well, the idea is that all PHP-specific code is licensed under the same license terms. PCRE and GD are external libraries which live outside PHP's context and which are simply bundled. That's why the clear preference there is PHP License. I have updated the license to have it dua

[PHP-DEV] email problem ... server in a black hole list ....

2008-04-08 Thread Alain Williams
It appears that my server bounced a mail from one of the servers that manages this list. This was because 216.92.131.4 is in a black list at dynablock.njabl.org Someone might want to check. - Forwarded message from [EMAIL PROTECTED] - Date: 8 Apr 2008 14:12:51 - From: [EMAIL PROTEC

Re: [PHP-DEV] email problem ... server in a black hole list ....

2008-04-08 Thread Daniel Brown
On Tue, Apr 8, 2008 at 10:28 AM, Alain Williams <[EMAIL PROTECTED]> wrote: > It appears that my server bounced a mail from one of the servers that manages > this list. > > This was because 216.92.131.4 is in a black list at dynablock.njabl.org > > Someone might want to check. [snip!] Looks

[PHP-DEV] [PATCH] Scanner fixes and tweaks

2008-04-08 Thread Matt Wilmas
Hi all, First, I just realized while going through the scanner code after the re2c changes that there's a bug with heredoc handling (from my code changes last year, oops) on something like: <

Re: [PHP-DEV] [PATCH] Scanner fixes and tweaks

2008-04-08 Thread Scott MacVicar
Thanks Matt, I'll review these and merge them in with my other scanner fixes. Scott Matt Wilmas wrote: Hi all, First, I just realized while going through the scanner code after the re2c changes that there's a bug with heredoc handling (from my code changes last year, oops) on something like:

Re: [PHP-DEV] Exceptions = Apache Crash in PHP 5.3 Snaps

2008-04-08 Thread Jeremy Privett
Jeremy Privett wrote: Hi Scott, Scott MacVicar wrote: Can you try a debug build with --enable-debug to get a more detailed backtrace. Also what is the exact configure line and which apache 2 model are you using? Worker or Pre-fork? Scott On 29 Mar 2008, at 01:12, Jeremy Privett wrote: Hey

Re: [PHP-DEV] intl naming

2008-04-08 Thread Stanislav Malyshev
Hi! The ICU API solves this issue nicely using the current locale. It would be easier to work with the intl API if the same principle was used. Add a Locale::setDefault() and Locale::getDefault(). You can use default locale, of course, and Locale class already has these functions. ht

Re: [PHP-DEV] intl naming

2008-04-08 Thread Pierre Joye
Hi Stan, On Tue, Apr 8, 2008 at 7:04 PM, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > > The ICU API solves this issue nicely using the current locale. It > > would be easier to work with the intl API if the same principle was > > used. Add a Locale::setDefault() and Locale::getDefault().

Re: [PHP-DEV] intl naming

2008-04-08 Thread Stanislav Malyshev
Hi! I did not find a way to do it in the manual or in the code. How do I set in PHP? And how is it possible to use it as default for all further calls (no matter which class/method)? Locale::setDefault() and Locale::DEFAULT. That's why I would prefer an array (as named arguments). The keys

Re: [PHP-DEV] intl naming

2008-04-08 Thread Pierre Joye
Hi! On Tue, Apr 8, 2008 at 8:53 PM, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > > I did not find a way to do it in the manual or in the code. How do I > > set in PHP? And how is it possible to use it as default for all > > further calls (no matter which class/method)? > > > > Locale::setDefa

Re: [PHP-DEV] intl naming

2008-04-08 Thread Tomas Kuliavas
>> As for validity, since locale mechanism has a bunch of fallbacks, I >> understand the validity concept is a bit blurred. I.e. you can have >> regexp >> to check all the -'s or _'s are in place but beyond that it's kind of >> hard >> to know what the question "is en_RU locale valid?" means. > >

[PHP-DEV] CVS Account Request: kwilms

2008-04-08 Thread Kurt Wilms
I have a PEAR package "Crypt_MicroID" (http://pear.php.net/pepr/pepr-proposal-show.php?id=542) that has been approved. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] intl naming

2008-04-08 Thread Pierre Joye
re, On Tue, Apr 8, 2008 at 9:35 PM, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: > > It is amazingly handy to know that a locale given by the user (UI or a > > developer using your library) is valid. What I like to have are > > > > What is "valid"? Database can have no exact match for locale str

Re: [PHP-DEV] intl naming

2008-04-08 Thread Stanislav Malyshev
Hi! It is amazingly handy to know that a locale given by the user (UI or a developer using your library) is valid. What I like to have are What is "valid"? Database can have no exact match for locale string, but still have some data from fallbacks, etc. getCountry, getISO3* etc. I can prov

Re: [PHP-DEV] intl naming

2008-04-08 Thread Stanislav Malyshev
Hi! Will you agree to extend the Locale API to provide more informations? If it makes sense and consistent with what ICU has - sure. -- Stanislav Malyshev, Zend Software Architect [EMAIL PROTECTED] http://www.zend.com/ (408)253-8829 MSN: [EMAIL PROTECTED] -- PHP Internals - PHP Runtime D

[PHP-DEV] Re: CVS Account Request: mimmi

2008-04-08 Thread Gregory Beaver
Thomas Mueller wrote: > distributing a new package Which package? For what? Greg -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] intl naming

2008-04-08 Thread David Zülke
Off the top of my head, ICU has this "path" style syntax to query CLDR data. I think that would be pretty important - the data is there, and grabbing it shouldn't be too difficult (can't check right now, but it's something like $locale->getInfo('currencyNames/EUR/long') or whatever). I al

Re: [PHP-DEV] intl naming

2008-04-08 Thread David Zülke
Am 08.04.2008 um 21:09 schrieb Pierre Joye: The idea is to have a way to get a code for a language, or to valid a given code, etc. Many applications actually duplicate this list internally, it would be very nice to be able to deal with the ICU lists (display, validation, listings, etc.). You

Re: [PHP-DEV] intl naming

2008-04-08 Thread Steph Fox
I also agree on the DateTime thing, and I, too, wonder why we need a procedural API for this - especially since it makes error handling so much easier (exceptions everywhere and done). Sure. If you happen to be one of the few PHP users who puts everything into try/catch blocks as a matter of c

Re: [PHP-DEV] intl naming

2008-04-08 Thread Edward Z. Yang
Steph Fox wrote: > So please, yes, keep the procedural way as an option, make it possible > for people to use PHP without their having to be computer scientists > first. The moment the language loses that, it has nothing special to > offer any more. +1 Nothing beats procedural for the quick and di

Re: [PHP-DEV] practical phar considerations

2008-04-08 Thread Gregory Beaver
Lars Strojny wrote: > Hi Greg, > > Am Samstag, den 29.03.2008, 17:58 -0500 schrieb Greg Beaver: > [...] >> If one uses file_put_contents('/path/to/this/file', 'hi') and >> '/path/to/this' does not exist, there is an error. The same is true of >> fopen, regardless of mode. mkdir() even fails un

Re: [PHP-DEV] intl naming

2008-04-08 Thread Pierre Joye
On Wed, Apr 9, 2008 at 12:07 AM, David Zülke <[EMAIL PROTECTED]> wrote: > Am 08.04.2008 um 21:09 schrieb Pierre Joye: > > It is amazingly handy to know that a locale given by the user (UI or a > > developer using your library) is valid. What I like to have are > > getCountry, getISO3* etc. I can p

Re: [PHP-DEV] practical phar considerations

2008-04-08 Thread Pierre Joye
Hi, On Wed, Apr 9, 2008 at 6:48 AM, Gregory Beaver <[EMAIL PROTECTED]> wrote: > For other examples, take a look at at > ext/zip. There is no support for opendir() in the stream wrapper of > ext/zip because it requires the kind of path grepping that pecl/phar > does. That's easy to add and

Re: [PHP-DEV] intl naming

2008-04-08 Thread Pierre Joye
On Wed, Apr 9, 2008 at 4:06 AM, Steph Fox <[EMAIL PROTECTED]> wrote: > This isn't how PHP used to be. This is a whole new way of coding, and you'd > like to force it onto people who never did that CS degree, but who coped > just fine until now. How sweet. Right, however I think you underestimate