Re: [PHP-DEV] Session Id Collisions

2012-08-24 Thread Yasuo Ohgaki
Hi, I was willing to add collision detection to session module after session adoption patch is merged. What's the status of session adoption patch? I've created patches for all 3 versions and I think Stats is going to merge it to master and PHP 5.4. Regards, -- Yasuo Ohgaki yohg...@ohgaki.net

Re: [PHP-DEV] Re: Combined assignment operator for short ternary

2012-08-24 Thread Nikita Popov
On Sat, Aug 25, 2012 at 1:49 AM, Sebastian Krebs wrote: > Hi, > > It's like with any other compound operator: A _real_ reason isn't there. But > saying "It's not worth it" is something I can live with (even if I don't > know how much effort it would take ;)). I just asked myself: '?:' is (a kind >

Re: [PHP-DEV] Re: Combined assignment operator for short ternary

2012-08-24 Thread Sebastian Krebs
Am 25.08.2012 01:00, schrieb Stas Malyshev: Hi! To point that out: I _don't_ want to change the behaviour, which means | $foo['xy'] ?:= 'bar'; would trigger a notice like | $foo['xy'] = $foo['xy'] ?: 'bar'; Then I personally don't see much point in it. Saving a couple of keystrokes IMHO is

Re: [PHP-DEV] Combined assignment operator for short ternary

2012-08-24 Thread Sebastian Krebs
Am 24.08.2012 23:11, schrieb Ferenc Kovacs: On Fri, Aug 17, 2012 at 11:41 PM, Sebastian Krebs mailto:krebs@gmail.com>> wrote: Hi, Don't know, how complicated this is (and also someone (not me) must implement it, because I can't :X), but to be in sync with the operators the

Re: [PHP-DEV] Re: Combined assignment operator for short ternary

2012-08-24 Thread Stas Malyshev
Hi! > To point that out: I _don't_ want to change the behaviour, which means > > | $foo['xy'] ?:= 'bar'; > > would trigger a notice like > > | $foo['xy'] = $foo['xy'] ?: 'bar'; Then I personally don't see much point in it. Saving a couple of keystrokes IMHO is not really worth it. -- Stanisla

Re: [PHP-DEV] Default input encoding for htmlspecialchars/htmlentities

2012-08-24 Thread Rasmus Lerdorf
On 08/24/2012 02:23 PM, Ángel González wrote: > El 23/08/12 18:06, Rasmus Lerdorf escribió: >> htmlspecialchars(), htmlentities(), html_entity_decode() and >> get_html_translation_table() all take an encoding parameter that used to >> default to iso-8859-1. We changed the default in PHP 5.4 to UTF-

Re: [PHP-DEV] Default input encoding for htmlspecialchars/htmlentities

2012-08-24 Thread Ángel González
El 23/08/12 18:06, Rasmus Lerdorf escribió: > htmlspecialchars(), htmlentities(), html_entity_decode() and > get_html_translation_table() all take an encoding parameter that used to > default to iso-8859-1. We changed the default in PHP 5.4 to UTF-8. This > is a much more sensible default and in th

Re: [PHP-DEV] Implicit isset in ternary operator

2012-08-24 Thread Ferenc Kovacs
On Fri, Aug 3, 2012 at 12:26 AM, Alex Aulbach wrote: > 2012/8/2 Andrew Faulds : > > Hi, > > > > Also in JavaScript if in strict mode. Legacy non-strict mode JS doesn't > cause an error though. > > > > JS's || operator supresses this error though, which is great for e.g. x > = x || new Object(); >

Re: [PHP-DEV] Combined assignment operator for short ternary

2012-08-24 Thread Ferenc Kovacs
On Fri, Aug 17, 2012 at 11:41 PM, Sebastian Krebs wrote: > Hi, > > Don't know, how complicated this is (and also someone (not me) must > implement it, because I can't :X), but to be in sync with the operators the > short ternary operator should be usable in conjunction with the assignment > like t

[PHP-DEV] Re: Combined assignment operator for short ternary

2012-08-24 Thread Sebastian Krebs
Hi, Just want to push my thread ^^ Nobody interested? Too stupid? I need to learn C (:X)? Too complicated? To much impact (on something)? Too less sense? BC? Anything not mentioned here? To point that out: I _don't_ want to change the behaviour, which means | $foo['xy'] ?:= 'bar'; would tr

Re: [PHP-DEV] Aspect Oriented Programming in PHP

2012-08-24 Thread Gustavo Lopes
On Fri, 24 Aug 2012 19:18:40 +0200, Anthony Ferrara wrote: Just a pedantic note here. You don't need any special functionality to do AOP style programming in PHP. In fact, this use-case is the exact definition of a Decorator. Instead of hooking in with a function call and cut-points, you wou

Re: [PHP-DEV] Aspect Oriented Programming in PHP

2012-08-24 Thread Peter Nguyen
Anthony, 2012/8/24 Anthony Ferrara > Peter, > > On Fri, Aug 24, 2012 at 2:36 PM, Peter Nguyen wrote: > >> This is exactly the "problem" that AOP solves. I think the decorator >> pattern is just a solution for the shortcoming of the language itself. > > > Actually, I think it's the other way aro

Re: [PHP-DEV] Aspect Oriented Programming in PHP

2012-08-24 Thread Anthony Ferrara
Peter, On Fri, Aug 24, 2012 at 2:36 PM, Peter Nguyen wrote: > This is exactly the "problem" that AOP solves. I think the decorator > pattern is just a solution for the shortcoming of the language itself. Actually, I think it's the other way around. Think about this for a second. With the AOP f

Re: [PHP-DEV] Aspect Oriented Programming in PHP

2012-08-24 Thread Peter Nguyen
This is exactly the "problem" that AOP solves. I think the decorator pattern is just a solution for the shortcoming of the language itself. What if you want multiple advices at that joint point, do you create decorator on decorator, call another class inside the decorator, or use the observer patte

Re: [PHP-DEV] Aspect Oriented Programming in PHP

2012-08-24 Thread Anthony Ferrara
Just a pedantic note here. You don't need any special functionality to do AOP style programming in PHP. In fact, this use-case is the exact definition of a Decorator. Instead of hooking in with a function call and cut-points, you would just decorate the object you want to interact with, and you're

Re: [PHP-DEV] Aspect Oriented Programming in PHP

2012-08-24 Thread Ralph Schindler
In addition, I think that the hook syntax has to be changed into the "call_user_func" one (instead of... "$obj->foo()" do array($obj, 'foo') ) I think the current syntax is fine. Keep in mind, you can use wildcards in that syntax, I do in my application, for example: // before all contro

Re: [PHP-DEV] Error handling brainstorming

2012-08-24 Thread Alex Aulbach
2012/8/24 Nicolas Grekas : >> ** >> The overall mood seems to be that since PHP has an error handler, everyone >> is free to handle errors any way they want. >> 2) When everyone starts handling errors in their own way with error >> handlers, you can't reliably use third party code. You are in your

Re: [PHP-DEV] Aspect Oriented Programming in PHP

2012-08-24 Thread Lester Caine
dukeofgaming wrote: AOP is the future and a very awesome complement to OOP. It is a shame that very few are doing it and I think this would attract some good attention to PHP after traits (both are horizontal reuse mechanisms). That is a bold statement! Do you have time to convert one of the CM

Re: [PHP-DEV] Aspect Oriented Programming in PHP

2012-08-24 Thread dukeofgaming
AOP is the future and a very awesome complement to OOP. It is a shame that very few are doing it and I think this would attract some good attention to PHP after traits (both are horizontal reuse mechanisms). On Fri, Aug 24, 2012 at 2:01 AM, Peter Nguyen wrote: > Well, you just have to know and c

Re: [PHP-DEV] [RFC] Generators

2012-08-24 Thread Lester Caine
Morgan L. Owens wrote: I suppose if you're lucky the consumer doesn't need to remember any state between one notification and the next, and it can treat every dataum like it's the first. But that is hardly the general case. Actually 75% of my 'producers' are simply reading the next line from a

Re: [PHP-DEV] [RFC] Generators

2012-08-24 Thread Lester Caine
Morgan L. Owens wrote: I accept your point about not caring about how the data was created, but on the other side, if the data creation is handling a lot more data than the consumer needs there is an amount of processing time that is wasted. The quick way of doing something does not equate to the

Re: [PHP-DEV] BC Break in PHP 5.3.16 Reflection API

2012-08-24 Thread Pierre Joye
hi! On Thu, Aug 23, 2012 at 4:24 PM, Laruence wrote: > Hi: >this bug has been fixed, just because it has two commits, thus > our RMs didn't pick them all to 5.3.16.. > >so, I think it is no need to re-open it. I re assigned it to the 5.3 RM. Thanks for the head up! Cheers, -- Pierre

Re: [PHP-DEV] BC Break in PHP 5.3.16 Reflection API

2012-08-24 Thread Pierre Joye
hi! On Thu, Aug 23, 2012 at 4:24 PM, Laruence wrote: > Hi: >this bug has been fixed, just because it has two commits, thus > our RMs didn't pick them all to 5.3.16.. > >so, I think it is no need to re-open it. > > thanks > > On Thu, Aug 23, 2012 at 8:47 PM, Benjamin Eberlei wrote: >> I

Re: [PHP-DEV] Error handling brainstorming

2012-08-24 Thread Nicolas Grekas
> ** > The overall mood seems to be that since PHP has an error handler, everyone > is free to handle errors any way they want. > 2) When everyone starts handling errors in their own way with error > handlers, you can't reliably use third party code. You are in your own > universe. > I think that'

Re: [PHP-DEV] Aspect Oriented Programming in PHP

2012-08-24 Thread Peter Nguyen
Well, you just have to know and check for the aspects I guess, if you're using wildcards in the joint points. It's no difference than knowing what PHP functions/classes/variables not to overwrite/overload. Besides, you can always debug_backtrace to find out which joint points was executed... Anothe