Re: system() Question
| From: | Nathan Nobbe | Date: | Thu, 01 Jan 2009 02:29:53 +0000 |
| Subject: | Re: system() Question | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-285321@lists.php.net to get a copy of this message | ||
On Wed, Dec 31, 2008 at 7:03 PM, Micah Gersten <micah@onshore.com> wrote:
> Nathan Nobbe wrote:
> >
> >
> > On Sun, Dec 28, 2008 at 8:40 PM, Micah Gersten <micah@onshore.com
> > <mailto:micah@onshore.com>> wrote:
> >
> > Nathan Nobbe wrote:
> > > good point dan, and just to add further clarification, thats b/c
> the
> > > function specifies $return_var is passed by reference in the formal
> > > parameter. when you include the & along w/ an actual parameter
> > (during
> > > function invocation) thats referred to as
> > call-time-pass-by-reference in
> > > php, and its typically frowned upon. in fact, i think its being
> > removed
> > > from a future version of php.
> > >
> > > -nathan
> > >
> > >
> > You don't call system using the ampersand. The reference is
> > declared in
> > the function definition. There's no reason for this to be frowned
> > upon.
> >
> >
> > well i dont think they deprecated it for shits-&-giggles.
> >
> > http://us.php.net/manual/en/language.references.pass.php
> >
> > its disabled by default in php.ini; wonder why.. ;)
> >
> >
> > What you are referring to is the old PHP4 style of explicit
> > pass-by-reference in function usage which is frowned upon.
> >
> >
> > no im referring to call-time-pass by reference, which works just as
> > well in php5; as long as you enable it in php.ini (or one of the other
> > various ways).
> >
> > and also, for clarification, marking parameters as pass-by-reference
> > works during method definition in php4 as well, of course.
> >
> > -nathan
> >
> I think I was confused here about your response. After re-reading a few
> times, I see that you were enhancing Dan's response by explaining what
> call-time pass by reference is, not saying that the function is used
> that way.
> My apologies.
>
no worries
-nathan