Reply to Re: PHP4 vs 5 programming

Your name:

Reply:


Posted by Justin Koivisto on 02/13/06 19:53

Schraalhans Keukenmeester wrote:
> Hi
>
> Since PHP5 classes use the __constructor() method, and PHP4 still
> requires the classname as constructor, is there an easy way to
> incorporate both in my class definitions so the class is usable in both
> versions?
>
> I know php5 will look for an old style constructor if there is no
> __constructor definition, but I am convinced this will be deprecated in
> future versions...

You could try doing something like:

class MyClass {
function __construct () {
$this->MyClass ();
}
}

I am personally starting to move over to PHP5 breaking PHP4 compat. ;)

--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com

[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

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