Re: [PHP-DEV] [PROPOSED] password_hash RFC - Implementing simplified password hashing functions

2012-07-16 Thread Galen Wright-Watson
On Sun, Jul 15, 2012 at 6:21 PM, Rasmus Lerdorf ras...@lerdorf.com wrote: On 07/15/2012 06:03 PM, Anthony Ferrara wrote: Additionally, DateTime is a class in core. Do any functions throw exceptions? Nope, and note that if you call those same DateTime functions procedurally they don't use

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

2012-07-18 Thread Galen Wright-Watson
On Wed, Jul 18, 2012 at 7:20 AM, Anthony Ferrara ircmax...@gmail.comwrote: On Wed, Jul 18, 2012 at 10:15 AM, Rafael Dohms lis...@rafaeldohms.com.br wrote: [...] This is basically because the ternary operator does not do a internal implicit isset, only an empty. It does not do an

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

2012-07-18 Thread Galen Wright-Watson
On Wed, Jul 18, 2012 at 12:21 PM, Galen Wright-Watson ww.ga...@gmail.comwrote: On Wed, Jul 18, 2012 at 7:20 AM, Anthony Ferrara ircmax...@gmail.comwrote: On Wed, Jul 18, 2012 at 10:15 AM, Rafael Dohms lis...@rafaeldohms.com.br wrote: [...] This is basically because the ternary

[PHP-DEV] RFC karma request

2012-07-18 Thread Galen Wright-Watson
I'd like to see some version of the null-coalescing ternary operator (recently brought up in a thread started by Rafael Dohms) make it into PHP. To help it along, may I have RFC karma so I can draft a proposal? My PHP wiki account name is outis, e-mail is ww.ga...@gmail.com. If there's a

Re: [PHP-DEV] Working with floats

2012-07-24 Thread Galen Wright-Watson
On Tue, Jul 24, 2012 at 1:01 AM, Kingsquare.nl - Robin Speekenbrink ro...@kingsquare.nl wrote: Hi all, [...] Why does the last of the following examples lower my key to 18 BUT does the var dump of the float clearly state 'float(19)' as the actual value: ?php [...] $i

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

2012-07-24 Thread Galen Wright-Watson
On Sun, Jul 22, 2012 at 9:08 PM, Sanford Whiteman swhitemanlistens-softw...@cypressintegrated.com wrote: [...] You do raise (maybe on purpose, not totally clear what you were getting at) the question of whether a more complex (expr1) in one of these theoretical ternarys w/implicit isset,

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

2012-07-24 Thread Galen Wright-Watson
On Sun, Jul 22, 2012 at 8:12 PM, Alex Aulbach alex.aulb...@gmail.comwrote: Do we really need that as operator? Why not using new functions for special cases. There isn't a need in the sense that such an operator makes things possible that otherwise aren't possible. There is a need in that

Re: [PHP-DEV] [RFC] Accessors : read-only / write-only keywords

2012-10-20 Thread Galen Wright-Watson
On Sat, Oct 20, 2012 at 12:09 PM, Lester Caine les...@lsces.co.uk wrote: I am in favor of eliminating the read-only/write-only keywords and implementing no special code to make what was read-only/write-only language enforced. I think the alternatives with final are just fine and good

Re: [PHP-DEV] Incomprehension with preg_match and utf8

2012-11-06 Thread Galen Wright-Watson
On Mon, Nov 5, 2012 at 8:54 PM, Philip Olson phi...@roshambo.org wrote: [...] A few simple/related facts: [...] - Gustavo mentioned the related PHP change on Oct 3, 2010 (not sure what PHP version, and googling for 87a237342 turns up empty, and I miss SVN version numbers) For

Re: [PHP-DEV] array_map() function modification

2013-01-12 Thread Galen Wright-Watson
On Sat, Jan 12, 2013 at 11:41 AM, Thomas Hruska thru...@cubiclesoft.comwrote: [...] The array_map() changes would allow for multiple arrays of values: array_map($keys, $vals, $vals2, $vals3); [...] But it would execute faster if it were supported in array_map(). If it is supported in

Re: [PHP-DEV] [VOTE] array_column() function

2013-01-12 Thread Galen Wright-Watson
On Sat, Jan 12, 2013 at 7:34 AM, Ben Ramsey ram...@php.net wrote: On 1/12/13 9:19 AM, Derick Rethans wrote: I'm liking this, why start with an function alias already when introducing a new feature? I figured this would be a frequent question, and I was right. :-) In earlier discussions

Re: [PHP-DEV] Random Monday thought.

2013-06-03 Thread Galen Wright-Watson
On Mon, Jun 3, 2013 at 10:30 AM, Richard Quadling rquadl...@gmail.comwrote: On 3 June 2013 18:22, Brandon Wamboldt bran...@brandonwamboldt.ca wrote: I think the point was that if somebody wants to extend one another class, maybe one of the SPL classes for example, they can't also extend the

Re: [PHP-DEV] Possibility to add finally to try/catch?

2012-02-28 Thread Galen Wright-Watson
A userland solution is possible making use of destructors to run anonymous functions (see How can I get around the lack of a finally block in PHP?http://stackoverflow.com/a/9244733/90527). However, there are a number of issues with this approach (some are outlined in the link), and language-level

Re: [PHP-DEV] '?=' with PHP5.3.10

2012-03-05 Thread Galen Wright-Watson
On Mon, Mar 5, 2012 at 5:50 AM, Lester Caine les...@lsces.co.uk wrote: OK what changed in the automatic updates from PHP5.3.9 to 5.3.10 that stops '?=' working when it was working previously? I do not recall the state of short_open_tag changing but was that 'defaulted' to off when previously

Re: [PHP-DEV] '?=' with PHP5.3.10

2012-03-05 Thread Galen Wright-Watson
On Mon, Mar 5, 2012 at 3:08 PM, Lester Caine les...@lsces.co.uk wrote: Galen Wright-Watson wrote: OK what changed in the automatic updates from PHP5.3.9 to 5.3.10 that stops '?=' working when it was working previously? I do not recall the state of short_open_tag changing

Re: [PHP-DEV] resume after exception

2012-04-02 Thread Galen Wright-Watson
On Mon, Apr 2, 2012 at 5:44 AM, Rasmus Schultz ras...@mindplay.dk wrote: I was just reading about the new async/await keywords in C# 5.0, and while this has no particular relevance to PHP as such, it got me thinking about this idea... What if you could resume execution after an exception was

[PHP-DEV] Access by siblings of (abstract) protected methods

2012-04-05 Thread Galen Wright-Watson
Last month, Ahmad Farouk asked a question on StackOverflow about siblings accessing protected methods http://stackoverflow.com/q/9425770/90527 ( http://stackoverflow.com/q/9425770/90527) in PHP (I've been using 5.3.8 on OS X; others haven't mentioned which versions they've tested). He was

Re: [PHP-DEV] resume after exception

2012-04-05 Thread Galen Wright-Watson
2012/4/5 Stas Malyshev smalys...@sugarcrm.com Hi! it's a wonderful mechanism with more uses than simply reporting errors - the aspect of transferring control is what I find really interesting about exceptions. Exceptions should not be used for flow control. [...] While exceptions

Re: [PHP-DEV] resume after exception

2012-04-05 Thread Galen Wright-Watson
On Thu, Apr 5, 2012 at 4:47 PM, Stas Malyshev smalys...@sugarcrm.comwrote: However, in general, thinking about more complex flow control structures in fine. Just there's no reason to get exceptions mixed into it. Agreed. While restarting and resuming after exceptions could be useful, and a

Re: [PHP-DEV] New Feature: Fully qualified class name resolution as scalar with class keyword

2012-04-17 Thread Galen Wright-Watson
On Sat, Apr 14, 2012 at 12:50 PM, Ralph Schindler ra...@ralphschindler.comwrote: Hi all, There are many different use cases were in code we expect classes names as arguments to functions as fully qualified names. We do this in ZF a lot with our Service Location and DI components, but also

Re: [PHP-DEV] Complete case-sensitivity in PHP

2012-04-20 Thread Galen Wright-Watson
On Fri, Apr 20, 2012 at 3:20 AM, C.Koy can5...@gmail.com wrote: As the recent comments on that page indicate, there's not a deterministic way to resolve this issue, apart from eliminating tolower() calls for function/class names during lookup. Hence totally case-sensitive PHP. What about

Re: [PHP-DEV] Complete case-sensitivity in PHP

2012-04-22 Thread Galen Wright-Watson
2012/4/22 C.Koy can5...@gmail.com On 4/21/2012 4:37 AM, Galen Wright-Watson wrote: What about instead creating a special-purpose Zend function to normalize class names (zend_normalize_class_name, or zend_classname_tolower)? This function would examine the current locale and, if it's

[PHP-DEV] Fixing bug #18556 (was: Complete case-sensitivity in PHP)

2012-04-23 Thread Galen Wright-Watson
On Mon, Apr 23, 2012 at 3:22 AM, C.Koy can5...@gmail.com wrote: On 4/22/2012 11:32 PM, Galen Wright-Watson wrote: 2012/4/22 C.Koycan5...@gmail.com On 4/21/2012 4:37 AM, Galen Wright-Watson wrote: But, I did not start this thread to discuss such bug fix, because: 1. It does not take

Re: [PHP-DEV] Fixing bug #18556 (was: Complete case-sensitivity in PHP)

2012-05-01 Thread Galen Wright-Watson
On Thu, Apr 26, 2012 at 3:45 AM, C.Koy can5...@gmail.com wrote: As of 5.3.0 this bug does not exist for function names. Only classes and interfaces. Turns out, if you cause a function to be called dynamically by (e.g.) using a variable function, the bug will surface. ?php

Re: [PHP-DEV] Fixing bug #18556 (was: Complete case-sensitivity in PHP)

2012-05-01 Thread Galen Wright-Watson
On Tue, May 1, 2012 at 11:11 AM, Galen Wright-Watson ww.ga...@gmail.comwrote: [...] Instead, a second set of locale-independent, unicode-aware conversion functions (basically, iliaa's original solution, but Unicode compatible) to be used for identifiers would make name resolution independent

Re: [PHP-DEV] Fixing bug #18556 (was: Complete case-sensitivity in PHP)

2012-05-02 Thread Galen Wright-Watson
On Wed, May 2, 2012 at 5:23 AM, C.Koy can5...@gmail.com wrote: On 5/1/2012 9:11 PM, Galen Wright-Watson wrote: On Thu, Apr 26, 2012 at 3:45 AM, C.Koycan5...@gmail.com wrote: As of 5.3.0 this bug does not exist for function names. Only classes and interfaces. Turns out, if you cause

Re: [PHP-DEV] Fixing bug #18556 (was: Complete case-sensitivity in PHP)

2012-05-04 Thread Galen Wright-Watson
On Fri, May 4, 2012 at 7:01 AM, C.Koy can5...@gmail.com wrote: On 5/2/2012 10:03 PM, Galen Wright-Watson wrote: On Wed, May 2, 2012 at 5:23 AM, C.Koycan5...@gmail.com wrote: On 5/1/2012 9:11 PM, Galen Wright-Watson wrote: On Thu, Apr 26, 2012 at 3:45 AM, C.Koycan5...@gmail.com wrote

Re: [PHP-DEV] Fixing bug #18556 (was: Complete case-sensitivity in PHP)

2012-05-05 Thread Galen Wright-Watson
On Sat, May 5, 2012 at 5:31 AM, C.Koy can5...@gmail.com wrote: I've been experimenting with bare-bones PHP I've built from pristine sources so far. Don't you think you should do the same, in dealing with such a bug? My personal system is a BSD derivative; the Turkish locales on these use

Re: [PHP-DEV] Support negative indexes for arrays and strings

2012-06-11 Thread Galen Wright-Watson
On Mon, Jun 11, 2012 at 12:13 PM, Stas Malyshev smalys...@sugarcrm.comwrote: Hi! Can be: $var = 'abc'; echo $var[-1]; This seems simple enough for a hard-coded -1, but... Would $var[-2] be strlen($var) - 2 and so on? The main question is what happens with foo[-4] or ['x'][-2].

Re: [PHP-DEV] Adding a simple API for secure password hashing?

2012-06-27 Thread Galen Wright-Watson
On Wed, Jun 27, 2012 at 6:07 AM, Solar Designer so...@openwall.com wrote: [...] BTW, what version of PHP introduced the === comparison operator? I guess this should become the minimum version for phpass since this is highly desirable to use. === was added on Oct 19, 1999. php_version.h

Re: [PHP-DEV] Adding a simple API for secure password hashing?

2012-06-27 Thread Galen Wright-Watson
On Wed, Jun 27, 2012 at 11:37 AM, Galen Wright-Watson ww.ga...@gmail.comwrote: On Wed, Jun 27, 2012 at 6:07 AM, Solar Designer so...@openwall.comwrote: [...] BTW, what version of PHP introduced the === comparison operator? I guess this should become the minimum version for phpass since

[PHP-DEV] Option to enable echo tags when short tags are turned off

2010-11-10 Thread Galen Wright-Watson
At the beginning of the year, someone put in a request for an option to enable echo tags when short tags are disabled (http://bugs.php.net/bug.php?id=50662). I've written a patch and two tests for the feature, and am looking for feedback and a developer to incorporate it into PHP 5.3 and 6. What