Re: [PHP-DEV] Re: TestFest 2010 News Announcement.

2010-06-09 Thread Hannes Magnusson
Why doesn't he have karma yet? IMO web/php/trunk/archive/ should be writable by all developers.. Eric: You need to commit the xinclude entry to the archive.xml file too. ..And php-webmaster@ is for webmaster stuffs :) -Hannes On Wed, Jun 9, 2010 at 16:45, Eric Stewart wrote: > On Sat, Jun 5, 20

Re: [PHP-DEV] Type hinting

2010-06-09 Thread Daniel Convissor
Hi Zeev: On Wed, Jun 09, 2010 at 05:17:13PM +0300, Zeev Suraski wrote: > > I think having E_TYPE (or whatever), a non-fatal notice that can be > either ignored or handled separately from everything else makes sense. I > think we may actually want to introduce it at the most basic levels of >

Re: [PHP-DEV] Type hinting

2010-06-09 Thread Lars Schultz
for example: $foo = 0; $foo += (int)'123abc'; // no error $foo += '123abc'; // E_TYPE Exactly. And to make sure we're on the same page: $foo += '123'; // no error +1 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Type hinting

2010-06-09 Thread Zeev Suraski
At 17:54 09/06/2010, Ferenc Kovacs wrote: If we introduce the E_TYPE what will be the new default/suggested error level? If it won't be "enabled" by default, then maybe we could introduce this in the whole language. I mean, if you implicitly convert '123asd' to integer, you will trigger this er

RE: [PHP-DEV] Type hinting

2010-06-09 Thread Zeev Suraski
At 19:55 09/06/2010, Jared Williams wrote: Is E_TYPE good enough? If it follows the other E_*, I'd suggest it's not. Yes, same error mechanism. Just having a single string error message describing the error, and having to unmangle the detailed information* from that doesn't seem that great.

Re: [PHP-DEV] [RFC] Array Dereferencing

2010-06-09 Thread Alban LEROUX
On 2010-06-09 16:06:37 +0200, Ferenc Kovacs said: In fact the uniq problem i see, is could be a name conflict like : function Foo() { // ... } class Foo() { public __create() { // ... } } Foo(); // Instanciate the class or call the function ? And I think that this is a much higher cost

Re: [PHP-DEV] [RFC] Array Dereferencing

2010-06-09 Thread Stas Malyshev
Hi! Let's me take the name __create() for this example : We already have __construct for creating objects of class Foo, and if those are objects of another class, you can always have a static factory. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900

RE: [PHP-DEV] Type hinting

2010-06-09 Thread Jared Williams
> -Original Message- > From: Zeev Suraski [mailto:z...@zend.com] > Sent: 09 June 2010 15:17 > To: Daniel Convissor > Cc: PHP Internals List > Subject: Re: [PHP-DEV] Type hinting > > At 02:59 09/06/2010, Daniel Convissor wrote: > >Hi Lukas: > > > >On Fri, Jun 04, 2010 at 08:28:12AM +020

Re: [PHP-DEV] Traits and static variables

2010-06-09 Thread Lukas Kahwe Smith
On 05.06.2010, at 22:47, Stefan Marr wrote: > Hi: > > Was just thinking about some details of the traits implementation. > > From my perspective, static variables in methods should work like the method > would have been actually implemented in the class using the traits. Thus, > static variab

Re: [PHP-DEV] Type hinting

2010-06-09 Thread Ferenc Kovacs
On Wed, Jun 9, 2010 at 4:17 PM, Zeev Suraski wrote: > At 02:59 09/06/2010, Daniel Convissor wrote: > >> Hi Lukas: >> >> On Fri, Jun 04, 2010 at 08:28:12AM +0200, Lukas Kahwe Smith wrote: >> > >> > Same deal as E_NOTICE. Either you care about them or you dont. >> >> Exactly. The type hinting situ

[PHP-DEV] Re: TestFest 2010 News Announcement.

2010-06-09 Thread Eric Stewart
On Sat, Jun 5, 2010 at 11:05 PM, Eric Stewart wrote: > Wrote up and attempted to commit a news announcement for TestFest 2010, > only to find out I don't have karma for that section of the repository. I've > attached the entry XML file if someone would be kind enough to commit it for > me. > > Tha

Re: [PHP-DEV] Type hinting

2010-06-09 Thread Zeev Suraski
At 02:59 09/06/2010, Daniel Convissor wrote: Hi Lukas: On Fri, Jun 04, 2010 at 08:28:12AM +0200, Lukas Kahwe Smith wrote: > > Same deal as E_NOTICE. Either you care about them or you dont. Exactly. The type hinting situation is unique. It is something that applications will frequently want to

Re: [PHP-DEV] [RFC] Array Dereferencing

2010-06-09 Thread Ferenc Kovacs
> > > In fact the uniq problem i see, is could be a name conflict like : > > function Foo() { > // ... > } > > class Foo() { > public __create() { > // ... > } > } > > Foo(); // Instanciate the class or call the function ? > > And I think that this is a much higher cost, that we gain. If we w

Re: [PHP-DEV] [RFC] Array Dereferencing

2010-06-09 Thread Alban LEROUX
On 2010-06-08 12:41:21 +0200, Johannes Schlüter said: On Tue, 2010-06-08 at 12:23 +0200, Jacob Oettinger wrote: Would it be equally simple to allow the syntax below? $result = new ResultMaker()->getIt(); does this mean $result = new (ResultMaker()->getIt()); or $result = (new Resu

Re: [PHP-DEV] Type hinting

2010-06-09 Thread christian . kaps
> - trigger_error OR exceptions? (we said, that exceptions shouldn't be > allowed inside the core, so maybe this can be only impelemted through spl) I think the exception discussion should be omitted. There exists some other RFCs to fix this issue. http://wiki.php.net/rfc/enhanced_error_handling h

Re: [PHP-DEV] Type hinting

2010-06-09 Thread Ferenc Kovacs
On Wed, Jun 9, 2010 at 12:08 PM, Lukas Kahwe Smith wrote: > > On 09.06.2010, at 12:01, André Rømcke wrote: > > > Example: > > function fetchById( int $id, bool $asObject = true ) > > > > If weak type hints are accepted, type hints would be useless in this case > as > > consumer can do something st

Re: [PHP-DEV] Type hinting

2010-06-09 Thread André Rømcke
Hi Lukas! On Wed, Jun 9, 2010 at 12:08 PM, Lukas Kahwe Smith wrote: > > On 09.06.2010, at 12:01, André Rømcke wrote: > > > Example: > > function fetchById( int $id, bool $asObject = true ) > > > > If weak type hints are accepted, type hints would be useless in this case > as > > consumer can do s

Re: [PHP-DEV] Type hinting

2010-06-09 Thread Lukas Kahwe Smith
On 09.06.2010, at 12:01, André Rømcke wrote: > Example: > function fetchById( int $id, bool $asObject = true ) > > If weak type hints are accepted, type hints would be useless in this case as > consumer can do something strange as fetchById( true, 'foo' ) (Obviously I'm > not saying anyone would

Re: [PHP-DEV] Type hinting

2010-06-09 Thread Richard Quadling
On 9 June 2010 00:59, Daniel Convissor wrote: > Hi Lukas: > > On Fri, Jun 04, 2010 at 08:28:12AM +0200, Lukas Kahwe Smith wrote: >> >> Same deal as E_NOTICE. Either you care about them or you dont. > > Exactly.  The type hinting situation is unique.  It is something that > applications will freque

Re: [PHP-DEV] Type hinting

2010-06-09 Thread André Rømcke
Hi all: On Wed, Jun 9, 2010 at 1:59 AM, Daniel Convissor < dani...@analysisandsolutions.com> wrote: > Hi Lukas: > > On Fri, Jun 04, 2010 at 08:28:12AM +0200, Lukas Kahwe Smith wrote: > > > > Same deal as E_NOTICE. Either you care about them or you dont. > > Exactly. The type hinting situation is

Re: [PHP-DEV] Constant and expression ?

2010-06-09 Thread Johannes Schlüter
On Wed, 2010-06-09 at 10:51 +0200, Frederic Hardy wrote: > > See zval_update_constant_ex in zend_API.c as a starting point. While > > such an approach would also require some parser work and some clever > > idea where/how to store the expression to be evaluated etc. > So, it's possible ? > Very go

Re: [PHP-DEV] Constant and expression ?

2010-06-09 Thread Frederic Hardy
On 05/19/2010 14:43, Johannes Schlüter wrote: Hi, On Wed, 2010-05-19 at 13:03 +0200, fqqdk wrote: 2010/5/19 Tjerk Anne Meesters I wrote a small article that gives an idea of the speed differences: http://shwup.blogspot.com/2010/04/about-constants.html Unfortunately this doesn't tell, what