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.
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);
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
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
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.
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
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,
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 you
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
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:
EOT
text
fooEOT
text
EOT;
Patch for 5.2 with just that fix:
http://realplain.com/php/heredoc_fix_5_2.diff
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:
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:
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.
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().
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
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::setDefault() and
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.
It is amazingly
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,
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 string, but
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
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
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
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 also
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.).
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
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 dirty
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 unless the
27 matches
Mail list logo