Re: DB_DataContainer

From: Date: Mon, 12 Mar 2007 23:42:57 +0000
Subject: Re: DB_DataContainer
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-250354@lists.php.net to get a copy of this message
If you are using PHP 5.0.0 or greater, use the one class, other wise, use the other. The 'eval' BS is to avoid the PHP compiler complaining that you have the same class defined twice. Frankly, it's pretty ugly, if you ask me... On Fri, March 9, 2007 7:08 pm, php trainer wrote: > Could someone explain what this does and why it's beneficial? > > Thanks, > > Ed > > -------------------------------------------------- > > if (version_compare(phpversion(), '5.0.0', 'ge')) { > > class DB_DataContainer_Overload { > function __call($method,$args) { > $retval = null; > $this->___call($method,$args,$retval); > return($retval); > } > } > > } else { > > eval(' > class DB_DataContainer_Overload { > function __call($method,$args,&$retval) { > return($this->___call($method,$args,$retval)); > } > } > '); > > } > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some starving artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#250354) next »