[PHP-DEV] Adding E_WARNING to pg_unescape_bytea()

2013-06-28 Thread Yasuo Ohgaki
Hi all, pg_unescape_bytea() should raise error for invalid inputs https://bugs.php.net/bug.php?id=65165 We need to discuss if E_WARING is proper, which branch should be changed. It will not break working code, so I would like to use E_WARNING and change it from PHP 5.4. Any comments? Regards,

Re: [PHP-DEV] Re: hex2bin: E_WARNING is too much for odd string?

2013-06-28 Thread Yasuo Ohgaki
Hi Sherif, 2013/6/29 Sherif Ramadan > > If we tried to fix all of PHP's functions to either return false always or > return false and raise errors always we'd have to fix every single PHP > function there is since there's absolutely no consistency there as it is. > > We don't have to change them

Re: [PHP-DEV] Re: hex2bin: E_WARNING is too much for odd string?

2013-06-28 Thread Sherif Ramadan
On Fri, Jun 28, 2013 at 9:41 PM, Yasuo Ohgaki wrote: > Hi Sherif, > > The problem is that current code 'returns false for invalid hex' while it > 'returns false and E_WARNING for invalid length'. > > We may choose behavior for invalid inputs > - return false always > - return false and raise E_

Re: [PHP-DEV] Re: hex2bin: E_WARNING is too much for odd string?

2013-06-28 Thread Yasuo Ohgaki
Hi Sherif, The problem is that current code 'returns false for invalid hex' while it 'returns false and E_WARNING for invalid length'. We may choose behavior for invalid inputs - return false always - return false and raise E_WARNING always Mixing them up is not good, especially in the same fu

Re: [PHP-DEV] session.name limitation fix or not fix?

2013-06-28 Thread Yasuo Ohgaki
Hi Stas, 2013/6/29 Stas Malyshev > > session.name cannot be integer like string, since it will be > initialized as > > "long" key hash while session module trying to find as "string" key > hash. I > > don't understand why some users are willing to use digits only session > > name, but problem is

Re: [PHP-DEV] Adding a time interval to an interval

2013-06-28 Thread Derick Rethans
Hey Simon, PS, please don't top-reply as per mailinglist guidelines: http://us2.php.net/reST/README.MAILINGLIST_RULES On Fri, 28 Jun 2013, Simon Schick wrote: > On Fri, Jun 28, 2013 at 7:10 PM, Derick Rethans wrote: > > > On Fri, 28 Jun 2013, Simon Schick wrote: > > > > > I'd like to extend the

Re: [PHP-DEV] Session Id Collisions

2013-06-28 Thread Stas Malyshev
Hi! > Sorry for the delay. > I've finally updated the strict session patch. I'll review it ASAP, probably on the weekend. Unfortunately, we've missed the window for 5.5 API changes, if there's any API change, but we can still do it in master. -- Stanislav Malyshev, Software Architect SugarCRM:

Re: [PHP-DEV] session.name limitation fix or not fix?

2013-06-28 Thread Stas Malyshev
Hi! > I was browsing bugs and found old feature request that can be fixed easily. > > Request #35703 when session_name("123") consist only digits, should warning > https://bugs.php.net/bug.php?id=35703&thanks=1 > > session.name cannot be integer like string, since it will be initialized as > "lo

Re: [PHP-DEV] Cherry picking #60560 for php 5.4

2013-06-28 Thread Stas Malyshev
Hi! > Bug #60560 was fixed in trunk while PHP 5.4 was in its RC phases. The fix > was never merged back to the 5.4 branch, meaning it's only avaailable on > the 5.5 release. > > Could we cherry pick it for the 5.4 branch ? > > The relevant commit is > http://git.php.net/?p=php-src.git;a=commit;h

Re: [PHP-DEV] Adding a time interval to an interval

2013-06-28 Thread Simon Schick
Hi, Derick Sorry - I that was easy to missunderstand ;) I thought of providing the idea. But I would happily also try to implement it by my own - just to also have contributed to the php-core. If you could give me a hint where to start - I feel quite lost in the code right now ... even so I read t

Re: [PHP-DEV] Adding a time interval to an interval

2013-06-28 Thread Derick Rethans
On Fri, 28 Jun 2013, Simon Schick wrote: > I'd like to extend the API of php by a method. Great, let me know if you need any help with the implementation, or when you have any questions on how it currently works. cheers, Derick -- http://derickrethans.nl | http://xdebug.org Like Xdebug? Consi

[PHP-DEV] Adding a time interval to an interval

2013-06-28 Thread Simon Schick
Hi, all I'd like to extend the API of php by a method. Currently it is possible to create a DateInterval ... but if you have two DateIntervals and want to "combine" them, you need to do it by your own. I think it'd be a good idea to add a method for that to the DateInterval class. http://stacko

Re: [PHP-DEV] RFC: Protocol Type Hinting

2013-06-28 Thread Lars Strojny
Hey Anthony, thanks for your work and I think it’s a very good idea. I thought very much of it during the last days and I start to see its merits. So, good thing. I would prefer ~Type for syntax over though, but that's just a minor detail. cu, Lars Am 25.06.2013 um 17:57 schrieb Anthony Ferra

Re: [PHP-DEV] Re: hex2bin: E_WARNING is too much for odd string?

2013-06-28 Thread Sherif Ramadan
On Fri, Jun 28, 2013 at 5:21 AM, Leszek Krupiński wrote: > On 2013-06-27 03:33, Sherif Ramadan wrote: > >> On Wed, Jun 26, 2013 at 9:05 PM, Yasuo Ohgaki wrote: >> >> Hi all, >>> >>> I've sent pull request for PHP-5.5 branch. >>> https://github.com/php/php-**src/pull/369

Re: [PHP-DEV] New syntax for multidimensional array loop with foreach

2013-06-28 Thread Benjamin Eberlei
You can build an iterator to do this for you, doesn't need to be in the language IMHO On Thu, Jun 27, 2013 at 4:10 PM, Christian Stoller wrote: > Hi internals, > > during my current work I had an idea for shorter array iteration with > foreach. I haven’t seen such a syntax until now, but I think

Re: [PHP-DEV] Re: hex2bin: E_WARNING is too much for odd string?

2013-06-28 Thread Leszek Krupiński
On 2013-06-27 03:33, Sherif Ramadan wrote: On Wed, Jun 26, 2013 at 9:05 PM, Yasuo Ohgaki wrote: Hi all, I've sent pull request for PHP-5.5 branch. https://github.com/php/php-src/pull/369 It's simple 1 liner removes E_WARNING for invalid length. Are there any objections? Yes, I object to r