Re: [studs-user] PHP Reference Variables and Functions Results by reference
Status: Beta
Brought to you by:
mojavelinux
|
From: Earnie B. <ea...@us...> - 2006-05-16 14:33:15
|
Quoting Earnie Boyd <ea...@us...>: > Dan, > > 1) With php-4.4 I'm finding that ``$bar =& foo()'' is returning the > "Only variables may be assigned by reference" exception when foo() is > return by reference; i.e. ``function &foo()''. 2) I also find that > within the function declared as return by reference that you cannot > return the results of any function, you must first set a variable > reference and then return the variable. > > As you can imagine this causes issues for studs as it is written. > I'm beginning to think I need to give up on PHP and look at Ruby on > Rails or Python. I'm pushing forward with trying to get the basic > example up but this isn't looking very promising. > > For 1) I have begun using $bar =& ref(foo()); > For 2) I use $return =& baz(); return $return; > Hooray!! Persistence toward this line of revision has brought the basic example to view. One issue on the page is the "This page has been viewed X times"; the numeric value replacing X isn't displaying. I'm preparing a patch of the changes thus far. There are many more changes that will be needed. Earnie http://shop.siebunlimited.com |