On Sun, Dec 28, 2008 at 6:49 PM, Daniel Brown <[email protected]> wrote:
> On Sun, Dec 28, 2008 at 18:10, Rick Pasotto <[email protected]> wrote: > > > > You overlooked the ampersand in front of $retval. The syntax for > > 'system' is: > > > > string system ( string $command [, int &$return_var ] ) > > > > You have to pass a pointer to the variable, not the variable itself. > > Actually, that's not entirely correct.... while the documentation > shows it as a reference variable, it's not actually required to be a > pointer. 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

