[PHP-DEV] Re: [PATCH] Notice on array to string convertion

2011-10-17 Thread Stas Malyshev
Hi! On 10/17/11 6:01 AM, Patrick ALLAERT wrote: @Stas, DSP Would you agree to merge this into PHP 5.4? *bump* Yes I think it's OK. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227 -- PHP Internals - PHP Runtime Development Mailing List To u

Re: [PHP-DEV] 5.4 undocumented stuff

2011-10-17 Thread Stefan Marr
Hi: On 16 Oct 2011, at 04:15, Stas Malyshev wrote: > class_uses - Stefan Added with: http://news.php.net/php.doc.cvs/8942 Furthermore, I added the documentation of __TRAIT__, and extended the docs for __CLASS__: http://news.php.net/php.doc.cvs/8943 Best regards Stefan -- Stefan Marr Softwa

Re: [PHP-DEV] Re: typehinting traits

2011-10-17 Thread Stefan Marr
Hi: On 17 Oct 2011, at 22:59, Ferenc Kovacs wrote: >> Thanks again for the clarification and for your work on traits! >> > > Jeff Carouth pointed out( > https://twitter.com/#!/jcarouth/status/126030715514138624) that we have > class_uses() (https://bugs.php.net/bug.php?id=55266), would be nice

[PHP-DEV] Re: typehinting traits

2011-10-17 Thread Ferenc Kovacs
On Mon, Oct 17, 2011 at 8:19 PM, Ferenc Kovacs wrote: > > > On Mon, Oct 17, 2011 at 8:00 PM, Stefan Marr wrote: > >> Hi Ferenc: >> >> On 17 Oct 2011, at 19:41, Ferenc Kovacs wrote: >> >> > Hi Stefan, >> > >> > Multiple people asked me that how they can expect/check that a given >> object uses a

[PHP-DEV] Re: typehinting traits

2011-10-17 Thread Ferenc Kovacs
On Mon, Oct 17, 2011 at 8:00 PM, Stefan Marr wrote: > Hi Ferenc: > > On 17 Oct 2011, at 19:41, Ferenc Kovacs wrote: > > > Hi Stefan, > > > > Multiple people asked me that how they can expect/check that a given > object uses a trait or not. > > Of course one could write the concrete methods as a t

[PHP-DEV] Re: typehinting traits

2011-10-17 Thread Stefan Marr
Hi Ferenc: On 17 Oct 2011, at 19:41, Ferenc Kovacs wrote: > Hi Stefan, > > Multiple people asked me that how they can expect/check that a given object > uses a trait or not. > Of course one could write the concrete methods as a trait and always use a > given interface for typehints, but I can'

[PHP-DEV] typehinting traits

2011-10-17 Thread Ferenc Kovacs
Hi Stefan, Multiple people asked me that how they can expect/check that a given object uses a trait or not. Of course one could write the concrete methods as a trait and always use a given interface for typehints, but I can't see why shouldn't instanceof and typehints in general work for traits. I

Re: [PHP-DEV] RM decision on BUG #55801 / FR #36424

2011-10-17 Thread David Soria Parra
On 2011-10-16, Stas Malyshev wrote: > Hi! > > On 10/7/11 2:11 AM, Michael Wallner wrote: >> So I can only see two solutions: >> - either disallow serialize/unserialize in __sleep/__wakeup >> - or revert r299770 > > So, what is the status of this? I think we better revert it for 5.4 and > look

Re: [PHP-DEV] enable mbstring by default

2011-10-17 Thread Klaus Silveira
I agree... in fact, most international developers don't know about this. They expect that PHP supports unicode by default, creating faulty software. Sad but true. On Mon, Oct 17, 2011 at 11:35 AM, Tom Boutell wrote: > Will PHP really never, ever, ever be unicode by default? It'll always > be a

Re: [PHP-DEV] enable mbstring by default

2011-10-17 Thread Tom Boutell
Will PHP really never, ever, ever be unicode by default? It'll always be a weird special case to not be from the shores of the Atlantic? On Thu, Oct 13, 2011 at 5:41 PM, Klaus Silveira wrote: > What drawbacks could possibly be brought with mbstring being enabled by > default? > > On Thu, Oct 13,

Re: [PHP-DEV] #60038 SIGALRM cause segfault in php_error_cb

2011-10-17 Thread Ferenc Kovacs
I know, I've just replied with an example to the "Such a performance regression sounds like an appropriate "punishment" to me for deploying bad code ;-)" statement. btw: http://www.tyrael.hu/2011/06/26/performance-of-error-handling-in-php/ http://www.tyrael.hu/2011/10/09/error-suppression-improvem

RE: [PHP-DEV] is_a fix for 5.4 and HEAD

2011-10-17 Thread Jonathan Bond-Caron
On Sun Oct 16 06:59 PM, Stas Malyshev wrote: > It definitely makes PHP worse by propagating inconsistent APIs. I created a patch against 5.4: https://bugs.php.net/patch-display.php?bug_id=55475&patch=is_a_5.4_alternati ve&revision=latest The patch changes the behavior to: is_a("ab", "b") // false

Re: [PHP-DEV] Ternary operator performance improvements

2011-10-17 Thread Alain Williams
On Fri, Oct 14, 2011 at 08:08:56PM +0200, Arnaud Le Blanc wrote: > Hi, > > I've already posted this patch and it has since been reviewed and improved. > I'm re-posting it for discussion before eventually commiting it. > > The ternary operator always copies its second or third operand, which is v

[PHP-DEV] Re: [PATCH] Notice on array to string convertion

2011-10-17 Thread Patrick ALLAERT
2011/6/20 Patrick ALLAERT : > 2011/6/2 Patrick ALLAERT : >> Hi, >> >> I would like to introduce an E_NOTICE when an array is silently >> converted to a string. >> This isn't very useful as it constantly produces the following string: >> "Array" and in most of the case, this is a sign of an error. >

Re: [PHP-DEV] Ternary operator performance improvements

2011-10-17 Thread Felipe Pena
2011/10/17 Ilia Alshanetsky : > Seems like a good patch, +1 from me on inclusion into 5.4/HEAD. > > On Fri, Oct 14, 2011 at 2:08 PM, Arnaud Le Blanc wrote: >> Hi, >> >> I've already posted this patch and it has since been reviewed and improved. >> I'm re-posting it for discussion before eventually

Re: [PHP-DEV] Ternary operator performance improvements

2011-10-17 Thread Ilia Alshanetsky
Seems like a good patch, +1 from me on inclusion into 5.4/HEAD. On Fri, Oct 14, 2011 at 2:08 PM, Arnaud Le Blanc wrote: > Hi, > > I've already posted this patch and it has since been reviewed and improved. > I'm re-posting it for discussion before eventually commiting it. > > The ternary operator

Re: [PHP-DEV] #60038 SIGALRM cause segfault in php_error_cb

2011-10-17 Thread Ilia Alshanetsky
Unless you are deleting thousands of files in a tight loop, the overhead involved won't make any difference for your application. In general your application is throwing many errors, even "benign" E_STRICT or E_NOTICE you are already incurring a performance hit. On Mon, Oct 17, 2011 at 3:49 AM, F

Re: [PHP-DEV] 5.4 beta

2011-10-17 Thread Pierre Joye
hi Hannes, On Mon, Oct 17, 2011 at 12:24 PM, Hannes Magnusson wrote: > The UPGRADING file has usually served as a base for > php.net/migration53 for example. > Its been a quite confusing topic though, stuff added in bugfix > release.. should that go there too? > The migration docs generally list

Re: [PHP-DEV] 5.4 beta

2011-10-17 Thread Hannes Magnusson
On Mon, Oct 17, 2011 at 12:24, Hannes Magnusson wrote: > On Sun, Oct 16, 2011 at 12:40, Pierre Joye wrote: >> hi, >> >> On Sun, Oct 16, 2011 at 4:17 AM, Stas Malyshev >> wrote: >>> Hi! >>> >>> On 10/7/11 11:13 AM, Hannes Magnusson wrote: The UPGRADING file is also completely worthless

Re: [PHP-DEV] 5.4 beta

2011-10-17 Thread Hannes Magnusson
On Sun, Oct 16, 2011 at 12:40, Pierre Joye wrote: > hi, > > On Sun, Oct 16, 2011 at 4:17 AM, Stas Malyshev wrote: >> Hi! >> >> On 10/7/11 11:13 AM, Hannes Magnusson wrote: >>> >>> The UPGRADING file is also completely worthless. >>> I have no idea what is going on, as a dev, nor as a documentor.

Re: [PHP-DEV] Issues with Traits / php crashes

2011-10-17 Thread Harald Lapp
hi pierre, yes, i will try to collect as many as possible information and open a bug, if i have something ... i still hope, that i manage to isolate the problem that i am able to create the reproduce script. best, harald Am 16.10.11 23:15, schrieb Pierre Joye: hi Harald, Please be sure to

Re: [PHP-DEV] Time zone database shut down by legal threat - Follow-up

2011-10-17 Thread Lester Caine
David Zülke wrote: FYI: http://blog.joda.org/2011/10/today-time-zone-database-was-closed.html This could impact PHP as well since it bundles the database. Just to follow up ... http://my.earthlink.net/article/tec?guid=20111016/ec375dde-65b5-4564-abce-48ed9d9ba258 From which it would seem that a

Re: [PHP-DEV] #60038 SIGALRM cause segfault in php_error_cb

2011-10-17 Thread Ferenc Kovacs
On Mon, Oct 17, 2011 at 8:54 AM, Stas Malyshev wrote: > Hi! > > > On 10/16/11 5:54 PM, Sebastian Bergmann wrote: > >> Such a performance regression sounds like an appropriate "punishment" to >> me for deploying bad code ;-) >> > > By bad code you mean not obsessively checking for stuff that is