Re: [PHP-DEV] Port random_bytes to PHP 5

2015-10-14 Thread Pierre Joye
On Oct 14, 2015 4:06 PM, "Sebastian Bergmann" wrote: > > On 10/13/2015 04:59 PM, Anthony Ferrara wrote: > > Overall, I don't think this should be ported back to 5.x > > +1 Same here. There are working solutions already for 5.4+, for example openssl rng functions and compat. Cheers, Pierre

Re: [PHP-DEV] Re: [RFC][DISCUSSION] Revisit trailing commas in function arguments

2015-10-14 Thread Daniel Persson
I'll echo Andrea remarks, -1, sorry. On Thu, Oct 15, 2015, 01:25 Andrea Faulds wrote: > Hey Sammy, > > Sammy Kaye Powers wrote: > > I'd like to open a discussion on the RFC to allow trailing commas in > > function arguments. > > > > https://wiki.php.net/rfc/revisit-trailing-comma-function-args >

Re: [PHP-DEV] [RFC] Void Return Type (v0.2, reöpening)

2015-10-14 Thread Larry Garfield
On 10/14/2015 06:30 PM, Andrea Faulds wrote: Which I believe gives the following options: 1) Change the language behavior such that function foo() : void { ...} $a = foo(); Is a syntax error (because there really was nothing returned to assign), rather than resulting in $a having a value of N

Re: [PHP-DEV] [RFC] Void Return Type (v0.2, reöpening)

2015-10-14 Thread Andrea Faulds
Hi Larry, Larry Garfield wrote: The tricky part here is that saying a function does not return is not something PHP currently does: https://3v4l.org/HtAuC No return implicitly returns NULL, which you can assign to a variable if, for some strange reason, you were so inclined. So this would be

[PHP-DEV] Re: [RFC][DISCUSSION] Revisit trailing commas in function arguments

2015-10-14 Thread Andrea Faulds
Hey Sammy, Sammy Kaye Powers wrote: I'd like to open a discussion on the RFC to allow trailing commas in function arguments. https://wiki.php.net/rfc/revisit-trailing-comma-function-args Discuss! :) Hmm. I'm not sure if this is a good idea. For arrays, trailing commas make perfect sense: ar

Re: [PHP-DEV] [RFC] Void Return Type (v0.2, reöpening)

2015-10-14 Thread Larry Garfield
On 10/14/2015 06:00 PM, Andrea Faulds wrote: Both you and Stas have said this, but it's only true if we solely consider C-like languages. Other languages do different things. In the PHP manual, Hack, TypeScript, ActionScript, and most likely other languages (these are just off the top of my hea

Re: [PHP-DEV] [RFC] Void Return Type (v0.2, reöpening)

2015-10-14 Thread Andrea Faulds
Hi Levi, Levi Morrison wrote: On Wed, Oct 14, 2015 at 4:00 PM, Stanislav Malyshev wrote: Hi! I'm reviving my Void Return Type RFC, this time for PHP 7.1: https://wiki.php.net/rfc/void_return_type Please read it and tell me your thoughts! I still see no point in this, as every PHP functio

Re: [PHP-DEV] [RFC] Void Return Type (v0.2, reöpening)

2015-10-14 Thread Korvin Szanto
On Wed, Oct 14, 2015 at 3:47 PM Levi Morrison wrote: > On Wed, Oct 14, 2015 at 4:00 PM, Stanislav Malyshev > wrote: > > Hi! > > > >> I'm reviving my Void Return Type RFC, this time for PHP 7.1: > >> > >> https://wiki.php.net/rfc/void_return_type > >> > >> Please read it and tell me your thoughts

Re: [PHP-DEV] [RFC] Void Return Type (v0.2, reöpening)

2015-10-14 Thread Ryan Pallas
On Wed, Oct 14, 2015 at 4:46 PM, Levi Morrison wrote: > > > I agree that `void` doesn't make sense given that we document that > `return;` will return null[1]. If the union types RFC[2] passes it > makes sense to allow `Foo | null` which allows something of type `Foo` > or `null`. To me it makes

Re: [PHP-DEV] [RFC] Void Return Type (v0.2, reöpening)

2015-10-14 Thread Levi Morrison
On Wed, Oct 14, 2015 at 4:00 PM, Stanislav Malyshev wrote: > Hi! > >> I'm reviving my Void Return Type RFC, this time for PHP 7.1: >> >> https://wiki.php.net/rfc/void_return_type >> >> Please read it and tell me your thoughts! > > I still see no point in this, as every PHP function actually return

Re: [PHP-DEV] [RFC] Void Return Type (v0.2, reöpening)

2015-10-14 Thread Stanislav Malyshev
Hi! > And, heck, we use void in the PHP manual all the time. Yes, because PHP manual *is* the documentation :) Note that function descriptions in the manual, while they are similar to PHP syntax, aren't actually valid PHP, even after scalar typing introduction. Bizarrely enough, they don't even m

Re: [PHP-DEV] [RFC] Void Return Type (v0.2, reöpening)

2015-10-14 Thread Andrea Faulds
Hi Stas, Stanislav Malyshev wrote: I still see no point in this, as every PHP function actually returns something (at least null). So this type would not actually be right and would not reflect what actually is happening. It wouldn't be incorrect. Not all languages with `void` prevent a func

Re: [PHP-DEV] [RFC] Void Return Type (v0.2, reöpening)

2015-10-14 Thread Stanislav Malyshev
Hi! > I'm reviving my Void Return Type RFC, this time for PHP 7.1: > > https://wiki.php.net/rfc/void_return_type > > Please read it and tell me your thoughts! I still see no point in this, as every PHP function actually returns something (at least null). So this type would not actually be right

[PHP-DEV] [RFC] Void Return Type (v0.2, reöpening)

2015-10-14 Thread Andrea Faulds
Good evening, I'm reviving my Void Return Type RFC, this time for PHP 7.1: https://wiki.php.net/rfc/void_return_type Please read it and tell me your thoughts! Thanks. P.S. As it so (fatefully?) happens, I originally introduced this on 14th February, and it's now 14th October, so it's been ex

[PHP-DEV] [RFC][DISCUSSION] Revisit trailing commas in function arguments

2015-10-14 Thread Sammy Kaye Powers
Hello internals friends! I'd like to open a discussion on the RFC to allow trailing commas in function arguments. https://wiki.php.net/rfc/revisit-trailing-comma-function-args Discuss! :) Thanks, Sammy Kaye Powers sammyk.me

[PHP-DEV] Benchmark Results for PHP Master 2015-10-14

2015-10-14 Thread lp_benchmark_robot
Results for project PHP master, build date 2015-10-14 05:13:26+03:00 commit: bcf6012cf4ffa7c9d1465448857a9e32f29aa39a revision date: 2015-10-13 15:51:42+02:00 environment:Haswell-EP cpu:Intel(R) Xeon(R) CPU E5-2699 v3 @ 2.30GHz 2x18 cores, stepping 2, LLC 45 MB mem

RE: [PHP-DEV] Scalar type hints and scalar type name aliases causeconfuson

2015-10-14 Thread Anatol Belski
Hi Andrea, > -Original Message- > From: Andrea Faulds [mailto:a...@ajf.me] > Sent: Wednesday, October 14, 2015 12:53 AM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] Scalar type hints and scalar type name aliases > causeconfuson > > Hi Dmitry, > > Dmitry Stogov wrote: > > > > I

Re: [PHP-DEV] Port random_bytes to PHP 5

2015-10-14 Thread Sebastian Bergmann
On 10/13/2015 04:59 PM, Anthony Ferrara wrote: > Overall, I don't think this should be ported back to 5.x +1 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DEV] Scalar type hints and scalar type name aliases cause confuson

2015-10-14 Thread Peter Cowburn
On 13 October 2015 at 23:49, Andrea Faulds wrote: > Hi Adam, > > Adam Harvey wrote: > >> (Sorry Andrea, I'm picking on your e-mail because it's easiest, but >> it's a general response to the thread.) >> > > Ah, don't worry about it. > > I agree that we should do something, but I think we should a