Reply to Re: __contruct in php4 not same behavior as php5

Your name:

Reply:


Posted by Ulf Kadner on 11/19/07 10:55

FFMG wrote:
^^^^---What wrote?

> But I would like to make it backward compatible in case something bad
> happens, (and to make sure I understand what the changes are).

No. Change or let it be!

> class TestClass {
> function TestClass() // For php4
> {
> $this->__construct();
> }
>
> var $_classValue = '';
> function __construct()// For php5 && 4
> {
> global $globalValue;
> $globalValue = $this;
>
> // I use a random to make certain we are talking about the same
> class.
> $this->_classValue = md5(uniqid(mt_rand()));
> }

What a stupid code! Sorry... :-)
Dont mix things like that. Separate strict PHP5 from PHP4. All other has
a bit of "Bullshit-Bingo".

I you have the real needing for PHP4 and PHP5-Version you have to do it
in seperate libraries.

Ulf

--
_,
_(_p> Ulf [Kado] Kadner
\<_)
^^

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация