Re[2]: [PHP] equivalent to perl shift function

[email protected] (Richard Luckhurst)
Newsgroups php.general
Organization Exodus Systems
Message-ID <[email protected]>
Hi Chris,

In perl ther is the concept of @_  which is the list of incoming parameter to a
subroutine. It is possible to have something like

my $sock = shift;

As I understand this the first parameter of the @_ list would be shifted.

I see for array_shift there must be an argument, the array name to shift, while
in perl if the array name is omitted the @_ function list is used. Is ther a php
equivalent to the @_ list or how might I use array_shift to achieve the same
result as in perl?

C> Richard Luckhurst wrote:
>> Hi All
>> 
>> I am in the process of porting a perl script and I am trying to fin out if there
>> is a php equivalent to the perl shift function? I have been looking at the php
>> manual and google searching so far with no luck.

C> http://www.php.net/manual/en/function.array-shift.php




Regards,
Richard Luckhurst
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.