Re: [PHP-DEV] Return Type Hinting for Methods RFC

2011-12-21 Thread Will Fitch
Hi Pierre and Nikita, I have added callable to the patch and updated the RFC entry to reflect the changes. Please verify and let me know if you have any issues. On Dec 21, 2011, at 2:33 PM, Pierre Joye wrote: > hi Will, > > You should add it now, while 5.4 final is not released yet, this > fea

Re: [PHP-DEV] CS random values

2011-12-21 Thread Anthony Ferrara
Tom, > I think it nicely demonstrates a degree of sophistication that should > not be expected from typical PHP usrs. Which is why it should be available in a library of some form. Could it be in core? Absolutely. Does it need to be? Nope... > [I don't think mixing mt_rand() + rand() + uniqi

Re: [PHP-DEV] Return Type Hinting for Methods RFC

2011-12-21 Thread Will Fitch
Will add tonight and generate a new patch. On Dec 21, 2011, at 2:33 PM, Pierre Joye wrote: > hi Will, > > You should add it now, while 5.4 final is not released yet, this > feature exists already and should be part of the RFC, to be complete. > > Cheers, > > On Wed, Dec 21, 2011 at 6:22 PM,

Re: [PHP-DEV] Return Type Hinting for Methods RFC

2011-12-21 Thread Pierre Joye
hi Will, You should add it now, while 5.4 final is not released yet, this feature exists already and should be part of the RFC, to be complete. Cheers, On Wed, Dec 21, 2011 at 6:22 PM, Will Fitch wrote: > Hi Nikita, > > I didn't add that as it's not yet in production.  As soon as things are >

Re: [PHP-DEV] CS random values

2011-12-21 Thread Pierre Joye
hi, Some short comments: On Wed, Dec 21, 2011 at 4:31 PM, Tom Worster wrote: > PHP does not in general allow access to the underlying system¹s > entropy source. I think it would be a good idea if it did. It does on unix using the almost generally available random and urandom. On Windows you ca

Re: [PHP-DEV] Fixing string offsets of strings.

2011-12-21 Thread Stas Malyshev
Hi! BTW these are failing in head at present - I guess somebody is working on them... globals in global scope [Zend/tests/globals_001.phpt] globals in local scope [Zend/tests/globals_002.phpt] globals in local scope - 2 [Zend/tests/globals_003.phpt] globals in local scope - 3 [Zend/tests/globals

Re: [PHP-DEV] CS random values

2011-12-21 Thread Tom Worster
On 12/21/11 12:07 PM, "Kiall Mac Innes" wrote: >On Wed, Dec 21, 2011 at 3:31 PM, Tom Worster wrote: >> >> 1. /dev/random and /dev/urandom are unavailable on Windows and >> cannot be fopen()¹ed in safe mode on *nix/nux > >Safe mode has been deprecated for two and a half years.. Adding features >t

Re: [PHP-DEV] Return Type Hinting for Methods RFC

2011-12-21 Thread Will Fitch
Hi Nikita, I didn't add that as it's not yet in production. As soon as things are finalized and 5.4 is GA, I will gladly add the callable type hint. The change wouldn't be different from parameter type hinting, and can easily be added. On Dec 21, 2011, at 12:17 PM, Nikita Popov wrote: > Hi W

Re: [PHP-DEV] CS random values

2011-12-21 Thread Tom Worster
Hi Anthony, Thank your for your reply. I inserted some comments below. On 12/21/11 11:19 AM, "Anthony Ferrara" wrote: >2. I was unable to do it. > >I did it fine. > >https://github.com/ircmaxell/PHP-CryptLib/tree/master/lib/CryptLib/Random I think it nicely demonstrates a degree of sophisticat

Re: [PHP-DEV] Return Type Hinting for Methods RFC

2011-12-21 Thread Nikita Popov
Hi Will! One random thought I had while reading the RFC is: What about the newly introduced callable typehint? Is this missing by intention? I could well imagine so (because it's hard to check what scope callability should be checked on), but wanted to be sure on that. Nikita On Wed, Dec 21, 201

Re: [PHP-DEV] CS random values

2011-12-21 Thread Kiall Mac Innes
On Wed, Dec 21, 2011 at 3:31 PM, Tom Worster wrote: > > 1. /dev/random and /dev/urandom are unavailable on Windows and > cannot be fopen()¹ed in safe mode on *nix/nux Safe mode has been deprecated for two and a half years.. Adding features to work around its limitations is (IMO) a bad idea.. Can'

Re: [PHP-DEV] CS random values

2011-12-21 Thread Anthony Ferrara
Tom, First off, very detailed post! However, there are a few things I'd disagree with. 1. Salts for crypt() purposes need to be cryptographically secure random numbers. This is not true. The only requirement is that a salt be reasonably unique (meaning that the chance of using the same one is

[PHP-DEV] CS random values

2011-12-21 Thread Tom Worster
Hi, I'm new to this list so please tolerate my unfamiliarity with protocol. PHP does not in general allow access to the underlying system¹s entropy source. I think it would be a good idea if it did. It is routine for web developers to write code in PHP that stores passwords in database tables or

Re: [PHP-DEV] Fixing string offsets of strings.

2011-12-21 Thread Alan Knowles
Done https://bugs.php.net/patch-display.php?bug_id=60362&patch=fix_to_prevent_warning_on_isset_empty_for_55_and_a_half.patch&revision=latest BTW these are f

Re: [PHP-DEV] Fixing string offsets of strings.

2011-12-21 Thread Alan Knowles
The fix for the warning is to use 0, rather than -1 as the last argument for is_numeric_string(), only in the zend_vm - isset code - it's a usefull warning when not used with isset. I'm just testing a patch and the related tests and will upload it to the bug soon. Regards Alan On Monday, De

[PHP-DEV] Debugging internal array corruption

2011-12-21 Thread Steve Hanselman
Hi all, Looking for a pointer on internals layout. I've an issue whereby php is seg faulting during a print_r, I can see that the corruption has already occurred in the hash at the start of the print_r, so now I want to set a breakpoint at the point that an entry is added to an array (so I ca

Re: [PHP-DEV] Constant arrays

2011-12-21 Thread jpauli
Okay, but those effectively don't exist in PHP ;) Julien On Tue, Dec 20, 2011 at 11:43 PM, David Muir wrote: > On 12/21/2011 03:37 AM, jpauli wrote: > > I guess constant array would mean that all the variables inside the array > > dimensions should not change. > > Just saying that, is a nonsens