Re: [PHP-DEV] Implicit Reference

2012-05-10 Thread Devis Lucato
Hi, I had a possible use case while working with an application registry. Any model could "get a copy" of it to read application settings or retrieve a resource. However if a model by mistake changed a property, it would modify the original object without going through proper setters... A quick

Re: [PHP-DEV] Implicit Reference

2012-05-10 Thread Ivan Enderlin @ Hoa
Hi Mathias, On 10/05/12 21:38, Mathias Grimm wrote: There is a suching extension to handle (intercepts) implicit (or no) reference. Ex.: $a = new A(): $b = $a; I want something like __clone(), something like __reference() to be invoked in the second line of the given example. Do you have a u

[PHP-DEV] Implicit Reference

2012-05-10 Thread Mathias Grimm
There is a suching extension to handle (intercepts) implicit (or no) reference. Ex.: $a = new A(): $b = $a; I want something like __clone(), something like __reference() to be invoked in the second line of the given example. Thanks. -- Mathias Grimm

Re: [PHP-DEV] implicit reference

2011-02-01 Thread Reindl Harald
Am 01.02.2011 10:21, schrieb Mathias Grimm: > It is a 2-step-migration nonsense > step 1 - php 4 and 5.3 the best way to trash something beautiflul > step 2 - only php 5.3 step 1 requires horrible code and so much work and with step 2 you have even more work to get the trash from step 1 cle

Re: [PHP-DEV] implicit reference

2011-02-01 Thread Mathias Grimm
It is a 2-step-migration step 1 - php 4 and 5.3 step 2 - only php 5.3 because there are various clients using that system. the development cycle cant stop with bug fixing and new features required by clients. no way to make a branch. We know that in the step 1 is a very horrible solution, but i

Re: [PHP-DEV] implicit reference

2011-01-31 Thread Reindl Harald
Am 31.01.2011 21:08, schrieb Mathias Grimm: > the constraint is that all need to run on php4.3.6 and 5.3 this need does not exist since php4 died a long time ago and now it's really time that some lazy people wake up everybody who has running php4 on prodcution servers has to be fired - remembe

Re: [PHP-DEV] implicit reference

2011-01-31 Thread Julien Pauli
Ow, what a crap idea ... You want to make the same php4-written source code run with PHP4 AND PHP5.3 ? That seems like an unsolvable challenge, I think that even if you dont mind very bad codes/stuff you won't make it fully work for production without alarms every minutes ... Good luck, Julien

Re: [PHP-DEV] implicit reference

2011-01-31 Thread Pierre Joye
On Mon, Jan 31, 2011 at 9:08 PM, Mathias Grimm wrote: > the constraint is that all need to run on php4.3.6 and 5.3 You may not have the choice but that's simply a very bad idea. -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP Internals - PHP Runtime Development

Re: [PHP-DEV] implicit reference

2011-01-31 Thread Mathias Grimm
the constraint is that all need to run on php4.3.6 and 5.3 I have one function called my_clone($obj) {} , if is php5 it is serialized and deserialized (to clone member recursively), if php4 just return the parameter. In first moment Im migrating all assignments to use my_clone and later manual upd

Re: [PHP-DEV] implicit reference

2011-01-31 Thread Ferenc Kovacs
On Mon, Jan 31, 2011 at 8:53 PM, Pierre Joye wrote: > hi, > > On Mon, Jan 31, 2011 at 6:38 PM, Mathias Grimm > wrote: > > > I dont want refereces.. except in explicit cases and i need to use php > 5.3 > > References have been abused in all possible and impossible ways. > > What are the exact cas

Re: [PHP-DEV] implicit reference

2011-01-31 Thread Pierre Joye
hi, On Mon, Jan 31, 2011 at 6:38 PM, Mathias Grimm wrote: > I dont want refereces.. except in explicit cases and i need to use php 5.3 References have been abused in all possible and impossible ways. What are the exact cases where you need to do it? Maybe it is already treated as reference any

Re: [PHP-DEV] implicit reference

2011-01-31 Thread Mathias Grimm
thanks, there is no = operator overloading =( On Mon, Jan 31, 2011 at 3:47 PM, Ferenc Kovacs wrote: > > > On Mon, Jan 31, 2011 at 6:45 PM, Ferenc Kovacs wrote: > >> On Mon, Jan 31, 2011 at 6:38 PM, Mathias Grimm wrote: >> >>> I am migrating a huge php 4 system to php 5.3. >>> >>> I need somet

Re: [PHP-DEV] implicit reference

2011-01-31 Thread Ferenc Kovacs
On Mon, Jan 31, 2011 at 6:45 PM, Ferenc Kovacs wrote: > On Mon, Jan 31, 2011 at 6:38 PM, Mathias Grimm wrote: > >> I am migrating a huge php 4 system to php 5.3. >> >> I need something like a op override for the = operator. >> >> I'm working on a script with lots of ER + token_get_all but its als

Re: [PHP-DEV] implicit reference

2011-01-31 Thread Ferenc Kovacs
On Mon, Jan 31, 2011 at 6:38 PM, Mathias Grimm wrote: > I am migrating a huge php 4 system to php 5.3. > > I need something like a op override for the = operator. > > I'm working on a script with lots of ER + token_get_all but its also a hard > work. > > Any suggestion ? > > I dont want refereces.

[PHP-DEV] implicit reference

2011-01-31 Thread Mathias Grimm
I am migrating a huge php 4 system to php 5.3. I need something like a op override for the = operator. I'm working on a script with lots of ER + token_get_all but its also a hard work. Any suggestion ? I dont want refereces.. except in explicit cases and i need to use php 5.3