> -Original Message-
> From: Zeev Suraski [mailto:z...@zend.com]
> Sent: Monday, September 16, 2013 11:52 PM
> To: 'Nikita Popov'; 'Stas Malyshev'
> Cc: 'PHP internals'
> Subject: RE: [PHP-DEV] [RFC] Syntax for variadic functions
>
&g
> -Original Message-
> From: Nikita Popov [mailto:nikita@gmail.com]
> Sent: Thursday, August 29, 2013 3:03 PM
> To: Stas Malyshev
> Cc: PHP internals
> Subject: Re: [PHP-DEV] [RFC] Syntax for variadic functions
>
> On Thu, Aug 29, 2013 at 12:09 AM, Stas Ma
2013/8/30 jbo...@openmv.com
> On Wed Aug 28 11:47 AM, Nikita Popov wrote:
> >
> > https://wiki.php.net/rfc/variadics
>
> Interesting idea, expanding on:
>
> function log($message, ...$options) {}
>
> It would seem convenient to allow ...$options to be passed as a key-value
> array of argument
On Wed Aug 28 11:47 AM, Nikita Popov wrote:
>
> https://wiki.php.net/rfc/variadics
Interesting idea, expanding on:
function log($message, ...$options) {}
It would seem convenient to allow ...$options to be passed as a key-value array
of arguments as well:
function logA($message, ...$optio
n't happen but I
don't think extending the associated functionality to be more vague is a
good choice.
-Original Message-
From: Lester Caine [mailto:les...@lsces.co.uk]
Sent: Thursday, August 29, 2013 7:52 AM
To: PHP internals
Subject: Re: [PHP-DEV] [RFC] Syntax for variadic fun
Nikita Popov wrote:
I'd like to propose an RFC, which adds dedicated syntax for variadic
functions:
https://wiki.php.net/rfc/variadics
I can remember in PHP4 days, passing parameters to the database as a string of
variables was the norm. Then arrays came along and it was preferable to pa
On Thu, Aug 29, 2013 at 12:09 AM, Stas Malyshev wrote:
> Hi!
>
> I like the idea, the concept of capturing "rest of args" is pretty
> common. But couldn't we in addition have func_get_args() be able to
> receive an int argument that would produce "the rest" in an easier way
> for those that prefer
2013/8/28 Nikita Popov :
> Hi internals!
>
> I'd like to propose an RFC, which adds dedicated syntax for variadic
> functions:
>
> https://wiki.php.net/rfc/variadics
>
> Basically this allows declaring variadics directly in the function
> signature, rather than fetching the arguments using func
Hi!
> functions should be able to ignore some arguments, especially ones that
> are optional anyway.
>
>
> This is not the current behavior, so why should we change it? See:
Because it makes no sense?
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)45
>
> functions should be able to ignore some arguments, especially ones that
> are optional anyway.
This is not the current behavior, so why should we change it? See:
1
Hi!
I like the idea, the concept of capturing "rest of args" is pretty
common. But couldn't we in addition have func_get_args() be able to
receive an int argument that would produce "the rest" in an easier way
for those that prefer func_ger_args()?
I wonder if this makes harder to implement named
On Wed, Aug 28, 2013 at 11:01 PM, Damian Wadley wrote:
> How about having the ellipsis _after_ the variable? That then coincides
> with phpDocumentor's recommended syntax of "$c,..."
>
That syntax has it neither before nor after, because there is no parameter
name.
and it keeps any typehint or
How about having the ellipsis _after_ the variable? That then coincides
with phpDocumentor's recommended syntax of "$c,..." and it keeps any
typehint or & with the variable name ("array &$arr..." versus "array
&...$arr") and, honestly, I think that reads more easily.
On Wed, Aug 28, 2013 at 1:15
On Wed, Aug 28, 2013 at 9:27 PM, Matthew Leverton wrote:
> Would any functions get deprecated as a result of this? e.g.,
> func_get_args()
>
Nope, func_get_args() etc stay. This is now mentioned in
https://wiki.php.net/rfc/variadics#userland.
> I assume it's a syntax error to do function fn(...
Am 28.08.2013 21:27, schrieb Matthew Leverton:
> On Wed, Aug 28, 2013 at 10:47 AM, Nikita Popov wrote:
>>
>
> Would any functions get deprecated as a result of this? e.g., func_get_args()
>
>
>
It's not a good idea to deprecate the function
func_get_args/func_num_args() because it is used
On Wed, Aug 28, 2013 at 10:47 AM, Nikita Popov wrote:
> Hi internals!
>
> I'd like to propose an RFC, which adds dedicated syntax for variadic
> functions:
> ...
>
> What are your thoughts on this?
>
I think it's great way to clean things up and add some subtle new
functionality, particularly with
On 28/08/13 17:47, Nikita Popov wrote:
Hi internals!
Hi Nikita :-),
I'd like to propose an RFC, which adds dedicated syntax for variadic
functions:
https://wiki.php.net/rfc/variadics
Basically this allows declaring variadics directly in the function
signature, rather than fetching the
On Wed, Aug 28, 2013 at 6:18 PM, Lazare Inepologlou wrote:
> Not only this does not work, but there is no way to make it work without
> modifying the original function. Would it be possible to extend the RFC
> with new syntax that could cover cases like that as well? Maybe something
> like that:
>
2013/8/28 Nikita Popov
> Hi internals!
>
> I'd like to propose an RFC, which adds dedicated syntax for variadic
> functions:
>
> https://wiki.php.net/rfc/variadics
>
> Basically this allows declaring variadics directly in the function
> signature, rather than fetching the arguments using func
19 matches
Mail list logo