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
On Mon, Jan 31, 2011 at 6:38 PM, Mathias Grimm mathiasgrimm@gmail.comwrote:
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
hi
it would be a better to migrate the project to using cloning where
neccessary
http://php.net/manual/en/language.oop5.cloning.php
but until that, you can use some hack like
http://pecl.php.net/package/operator (don't know if it works with 5.3)
Tyrael
On Mon, Jan 31, 2011 at 6:38 PM, Mathias Grimm mathiasgrimm@gmail.comwrote:
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
hi
it would be a better to migrate the project to using cloning where
neccessary
http://php.net/manual/en/language.oop5.cloning.phpbut until that, you can use some hack like
http://pecl.php.net/package/operator (don't know if it works with 5.3)Tyrael
and for the record, we had a config to turn back that behavior in php5, but
that was removed with 5.3:
http://www.php.net/manual/en/ini.core.php#ini.zend.ze1-compatibility-mode
Tyrael
thanks, there is no = operator overloading =(
On Mon, Jan 31, 2011 at 6:38 PM, Mathias Grimm mathiasgrimm@gmail.comwrote:
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.3hi
it would be a better to migrate the project to using cloning where
neccessary
http://php.net/manual/en/language.oop5.cloning.phpbut until that, you can use some hack like
http://pecl.php.net/package/operator (don't know if it works with 5.3)Tyrael
and for the record, we had a config to turn back that behavior in php5, but
that was removed with 5.3:
http://www.php.net/manual/en/ini.core.php#ini.zend.ze1-compatibility-modeTyrael
hi,
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 anyway (like obj as argument for a
function/method).
Cheers,
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
hi,
On Mon, Jan 31, 2011 at 6:38 PM, Mathias Grimm mathiasgrimm@gmail.com
wrote:I dont want refereces.. except in explicit cases and i need to use php
5.3References 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 anyway (like obj as argument for a
function/method).
I think he is hit by this backward incompatible change:
http://www.php.net/manual/en/migration5.oop.php
http://www.php.net/manual/en/migration5.oop.php imo migrating a fairly
large php app from php 4 to 5.3 isn't exactly like a walk in the park
Tyrael
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 update each one. im ignoring some obvious assignments like strings,
concatenation, constants and so on.
The system have about 3 million of php 4.3.6 lines, no way to manual
migrating.
By now im mixing ER + token_get_all but is like build a parser...
hi,
On Mon, Jan 31, 2011 at 6:38 PM, Mathias Grimm mathiasgrimm@gmail.com
wrote:I dont want refereces.. except in explicit cases and i need to use php
5.3References 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 anyway (like obj as argument for a
function/method).Cheers,
Pierre
@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
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
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
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
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 - remember php5.2 support is even ending and of course
such stupid admins are tey one their servers get hacked and
used for spambots and other nice things the world do not need
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 its necessary.
Even with this compatible mode (php4 and 5.3) the system is getting 50%
faster on php 5.3
On Tue, Feb 1, 2011 at 3:41 AM, Reindl Harald h.reindl@thelounge.netwrote:
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 upeverybody who has running php4 on prodcution servers has to be
fired - remember php5.2 support is even ending and of course
such stupid admins are tey one their servers get hacked and
used for spambots and other nice things the world do not need
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 clean
because there are various clients using that system
so let them run on a old machine with php 4
the development cycle cant stop with bug fixing and new
features required by clients.
the devleopment cycle will die because you trash too much time
with nonsense work resulting in sleeping since years
no way to make a branch.
no way to get it without because if your code is so ugly
that it will not run with PHP5 you have so much changes
you can not do on live-systems - remind that all your
changes to be backward compatible can have side-effects
in PHP4 and PHP5
We migrated 5 years ago to php5 and it took 2 hours
because we are running the highest error-reporting in
production and so we seen deprecated warnings long
before and made the code clean
What you do is a migration over 3 major-versions
Yes, 5.2->5.3 is in some cases the same as 4->5
and this is a path which does not really exist
We know that in the step 1 is a very horrible solution, but its necessary.
Even with this compatible mode (php4 and 5.3) the system is getting 50% faster on php 5.3
have fun but let me remember that if you do this so
the chance to shoot all down and waste much more
time as making a branch for 5.3 with code-cleanups
outside production level and update after all
is done
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 - remember php5.2 support is even ending and of course such stupid admins are tey one their servers get hacked and used for spambots and other nice things the world do not need