Re: [PHP-DEV] References in the session

2017-02-22 Thread Yasuo Ohgaki
Hi, On Thu, Feb 23, 2017 at 10:10 AM, Johannes Schlüter wrote: > On Wed, 2017-02-22 at 15:01 +0100, Côme Chilliet wrote: > > Hello, > > > > In the $_SESSION documentation we can see the following warning: "You > > can't use references in session variables as there is no feasible way > > to resto

Re: [PHP-DEV] References in the session

2017-02-22 Thread Johannes Schlüter
On Wed, 2017-02-22 at 15:01 +0100, Côme Chilliet wrote: > Hello, > > In the $_SESSION documentation we can see the following warning: "You > can't use references in session variables as there is no feasible way > to restore a reference to another variable." Actually with register_globals gone tha

[PHP-DEV] References in the session

2017-02-22 Thread Côme Chilliet
Hello, In the $_SESSION documentation we can see the following warning: "You can't use references in session variables as there is no feasible way to restore a reference to another variable." In our application, references where stored in the session and it *seemed to* work fine under PHP5, and

Re: [PHP-DEV] References in rfc:propertygetsetsyntax

2013-01-22 Thread Richard Quadling
On 22 January 2013 01:08, Clint Priest wrote: > On 1/21/2013 12:36 PM, Richard Quadling wrote: > > Hello. > > This may have already been covered, so apologies ... > > With https://wiki.php.net/rfc/propertygetsetsyntax-v1.2#references, > the return by reference is handled by the use of &get{}. > >

Re: [PHP-DEV] References in rfc:propertygetsetsyntax

2013-01-21 Thread Clint Priest
On 1/21/2013 12:36 PM, Richard Quadling wrote: Hello. This may have already been covered, so apologies ... With https://wiki.php.net/rfc/propertygetsetsyntax-v1.2#references, the return by reference is handled by the use of &get{}. How about pass-by-reference for set{}? It works, it was simpl

[PHP-DEV] References in rfc:propertygetsetsyntax

2013-01-21 Thread Richard Quadling
Hello. This may have already been covered, so apologies ... With https://wiki.php.net/rfc/propertygetsetsyntax-v1.2#references, the return by reference is handled by the use of &get{}. How about pass-by-reference for set{}? Normally, a function definition dictates this. But if $value is alread

[PHP-DEV] references / zend_assign_to_variable / IS_CONST operands in APC

2008-03-28 Thread Kannan Muthukkaruppan
Consider the following small test case where $y is first made to be a reference to $x. And next, we assign a literal to $y. Example #1: refcount; zval garbage; if (type!=IS_TMP_VAR) { value->refcount++; <- incrementing the refcount of RHS zval } garbage = *va

Re: [PHP-DEV] references in arrays

2005-09-15 Thread Ron Korving
Perfect :) I've been doing it wrong all the time, thinking I was improving performance. It's good to know how things really work under the hood. Thanks, Ron "Zeev Suraski" <[EMAIL PROTECTED]> schreef in bericht news:[EMAIL PROTECTED] > At 13:35 15/09/2005, Ron Korving wrote: > >Hi, > > > >For p

Re: [PHP-DEV] references in arrays

2005-09-15 Thread Zeev Suraski
At 13:35 15/09/2005, Ron Korving wrote: Hi, For performance' sake, I have to know if this is true: Is it the case that when I do this: array(0,1,2), "two" => array(4,5,6)); $one = $array["one"]; ?> That $one is not a copy, but a reference to $array["one"] and will only become a copy when I

[PHP-DEV] references in arrays

2005-09-15 Thread Ron Korving
Hi, For performance' sake, I have to know if this is true: Is it the case that when I do this: array(0,1,2), "two" => array(4,5,6)); $one = $array["one"]; ?> That $one is not a copy, but a reference to $array["one"] and will only become a copy when I alter the contents of $one? I know this i

Re: [PHP-DEV] References

2003-08-30 Thread Derick Rethans
On Sat, 30 Aug 2003 [EMAIL PROTECTED] wrote: > Firstly, thanks for the tip. > Secondly, since you fixed the problems I enumerated in another version, > it would seem that my posting is relevant to development. That's not your decision to make. It's totally irrelevant. Derick -- "Interpreting

Re: [PHP-DEV] References

2003-08-30 Thread LingWitt
Firstly, thanks for the tip. Secondly, since you fixed the problems I enumerated in another version, it would seem that my posting is relevant to development. Thanks, [EMAIL PROTECTED] On Saturday, Aug 30, 2003, at 10:22 America/New_York, Derick Rethans wrote: Try PHP 5, and stop mailing those

Re: [PHP-DEV] References

2003-08-30 Thread Derick Rethans
On Sat, 30 Aug 2003 [EMAIL PROTECTED] wrote: > The current support for references is mediocre at best. For instance: > > class foobar > { > var $variable; > > function foobar() > { > $variable = "foobar"; > } > } > > //This form of new assignment shou

[PHP-DEV] References

2003-08-30 Thread LingWitt
The current support for references is mediocre at best. For instance: class foobar { var $variable; function foobar() { $variable = "foobar"; } } //This form of new assignment should be the default $a = & new foobar(); $b = & new foobar(); $