Re: Re: RfC: *_fetch_object()

From: Date: Sat, 09 Nov 2002 12:36:30 +0000
Subject: Re: Re: RfC: *_fetch_object()
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-90699@lists.php.net to get a copy of this message
On Fri, 2002-11-08 at 23:41, Yasuo Ohgaki wrote: > I don't mind making pg_fetch_object() accept object (not class) > optionally and initialize field values as object's properties. What you're saying would be: $a= pg_fetch_object($q, new Article()); It is certainly not common for PHP functions to accept "new Something()" as a parameter. Although it is sexy, does it make sense to users? Why would a fetch function accept an instance of an object? Just my .02 EUR:-) > How about other db module maintainers? > > BTW, pg_fetch_object() accepted 3rd optional parameter > for a long time. I've disabled it recently, since having > $obj->1, $obj->2, and so on does not make much sense. I've done away with them. If anyone for any reason still wants them, (object)sybase_fetch_array($q) is the way to go. - Timm

« previous php.dev (#90699) next »