I attached a patch and a phpt-file for a small patch to array_reduce
to allow any type of $initial value. This patch is for HEAD but could
easily be applied/ported to 5.3.
- Chris
Index: ext/standard/array.c
===
RCS file: /repos
On 03.04.2008, at 15:47, 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
Richard Quadling schrieb:
Type juggling just doesn't seem to fit well with me.
You seem to live in a completely different PHP world. Because in our
case we use (yes, knowingly use) the PHP type juggling and it safes us
lots of manual type conversions.
We get input from all different sources
On 07/04/2008, Christian Schneider <[EMAIL PROTECTED]> wrote:
> Just so this side was mentioned once again too: There are people who
> consider type hints and especially scalar type hints A Bad Thing(tm) as
> it is contrary to the PHP strength of dynamic typing and automatic type
> conversion.
Hi!
Executing the code above results in a warning: "The use statement with
non-compound name 'Test1' has no effect in [...]".
This is correct, use Test1 is a no-op.
I understand the rationale behind this warning but it simply isn't true:
omitting the use statement results in a fatal error: "
Hi!
Right if at all I would agree on having a type hint "scalar", but not a
separate one per type.
IMO (as already was discussed like 10 times?) "scalar" makes no sense.
It doesn't save you any checks, and doesn't provide any useful
information and can't perform any useful conversions, etc.
On 07.04.2008, at 18:57, Stanislav Malyshev wrote:
Hi!
I just ran into this (IMHO unnecessary) limitation with array_reduce:
Why should it only reduce to an int? Why not a string or an array? I
plan on submitting a patch for PHP 6 to allow other types too.
I'm not sure I understand - how arr
On 07.04.2008, at 18:49, Christian Schneider wrote:
Felipe Pena wrote:
Right, this shouldn't even be on the agenda before we have scalar
type
hints. So, perhaps you can make a patch for that first Felipe?
I don't thought this before!
Sure, i'll try provide a patch.
Just so this side was m
Stanislav Malyshev wrote:
> I'm not sure I understand - how array_reduce is related to having type
> hints? You could make array_reduce to do additional things, but that
> doesn't require introducing strong typing into php.
The relation between array_reduce and scalar type hints is that API
start
Hi!
I just ran into this (IMHO unnecessary) limitation with array_reduce:
Why should it only reduce to an int? Why not a string or an array? I
plan on submitting a patch for PHP 6 to allow other types too.
I'm not sure I understand - how array_reduce is related to having type
hints? You could
Felipe Pena wrote:
>> Right, this shouldn't even be on the agenda before we have scalar type
>> hints. So, perhaps you can make a patch for that first Felipe?
>
> I don't thought this before!
> Sure, i'll try provide a patch.
Just so this side was mentioned once again too: There are people who
c
Andrei Zmievski wrote:
Lester Caine wrote:
I KEEP asking what is holding up making a beta release of PHP6, and I
see nothing in the 2005 meeting that is anything more than a
restructure and recompile using unicode as the base. MOST of the other
things are just removing things that are now norm
On 2008-04-07 11:22, Josie Messa wrote:
On Sun, Apr 6, 2008 at 10:44 PM, Christian Hoffmann <[EMAIL PROTECTED]>
wrote:
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 wit
On 4/7/08 9:15 AM, Jarismar Chaves da Silva wrote:
Or something like this would be nice too, please avoid using + or
().
class test {
public static Itest function testing($instance) {
return $instance;
}
}
I think this is the most intuitive approach. However, this means that regul
I have a scalar type hinting patch on my blog at www.sambarrow.com
On Mon, 2008-04-07 at 10:57 -0300, Felipe Pena wrote:
>
> I don't thought this before!
> Sure, i'll try provide a patch.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.p
Em Seg, 2008-04-07 às 15:44 +0200, Derick Rethans escreveu:
> On Sun, 6 Apr 2008, Mike Lively wrote:
>
> > On Sun, Apr 6, 2008 at 8:41 PM, Felipe Pena <[EMAIL PROTECTED]> wrote:
> >
> > > - PHP types
> > >
> > > function (string) foo(...) { } // Unicode string too
> > > function (object) foo(...)
On Sun, 6 Apr 2008, Mike Lively wrote:
> On Sun, Apr 6, 2008 at 8:41 PM, Felipe Pena <[EMAIL PROTECTED]> wrote:
>
> > - PHP types
> >
> > function (string) foo(...) { } // Unicode string too
> > function (object) foo(...) { } // Strict
> > function (array) foo(...) { } // Strict
> > function (
Hello,
Em Seg, 2008-04-07 às 10:15 -0300, Jarismar Chaves da Silva escreveu:
> Or something like this would be nice too, please avoid using +
> or ().
>
> class test {
> public static Itest function testing($instance) {
>return $instance;
> }
> }
>
> troels knak-nielsen wrote:
>
Or something like this would be nice too, please avoid using + or
().
class test {
public static Itest function testing($instance) {
return $instance;
}
}
troels knak-nielsen wrote:
On Mon, Apr 7, 2008 at 2:28 PM, Felipe Pena <[EMAIL PROTECTED]> wrote:
class test {
stati
On Mon, Apr 7, 2008 at 2:28 PM, Felipe Pena <[EMAIL PROTECTED]> wrote:
> class test {
>static public function +Itest testing($instance) {
>return $instance;
>}
> }
A more sane syntax, might be something like:
class test {
static function testing($instance) :
I'm pretty sure its to do with flex allocating + 2 onto the end of the
original size to look for 2 null bytes to indicate the last token. In
some cases the last token gets lost.
This may be something that needs handled in the parser rather than the
tokenizer. I'd need to investigate some more.
Hi Xuefer, all,
Yeah, the re2c patch did change (or add?) a bit for handling the "#"
character (though I haven't investigated your example...).
However, I wanted to report that I just started playing with some changes to
the scanner (re2c), and am seeing weird (or "wired" re: subject :-P) stuff
t
Em Seg, 2008-04-07 às 01:32 -0700, [EMAIL PROTECTED] escreveu:
> >
> > :: Question
> > - Weird syntax?|
> >
> >
>
> The syntax with the type casting seems abit weird as I've wrote above, I
> would sug
Em Seg, 2008-04-07 às 15:48 +1000, Timothy Chandler escreveu:
> I guess I should say it before anyone else does...
>
> "It's not the PHP way"
>
Do you mean the way that i initially suggest?
Anyway return type hints (probably)? will implemented,
at least it was accepted in 'Minutes PHP Develope
On 07/04/2008, Timothy Chandler <[EMAIL PROTECTED]> wrote:
> I guess I should say it before anyone else does...
>
> "It's not the PHP way"
>
> - Timothy Chandler
> Simple Site Solutions
And before PHP6 neither was native Unicode.
And before PHP5 neither was a lot of the cool features of OOP (y
PHP 6 Bug Database summary - http://bugs.php.net
Num Status Summary (58 total including feature requests)
===[*General Issues]==
26771 Suspended register_tick_funtions crash under threaded webservers
===
On Sun, Apr 6, 2008 at 10:44 PM, Christian Hoffmann <[EMAIL PROTECTED]>
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 extensi
27 matches
Mail list logo