Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:10740 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30125 invoked by uid 1010); 24 Jun 2004 01:46:50 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 30100 invoked by uid 1007); 24 Jun 2004 01:46:50 -0000 Message-ID: <20040624014649.30099.qmail@pb1.pair.com> To: internals@lists.php.net References: <20040622164209.23239.qmail@pb1.pair.com> <5.1.0.14.2.20040622180046.02e53768@127.0.0.1> <20040622171622.64014.qmail@pb1.pair.com> Date: Thu, 24 Jun 2004 11:33:54 +1000 Lines: 56 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Posted-By: 144.132.76.111 Subject: Re: [PHP-DEV] Bug 28879: Populating arrays with resources and objects as offsets From: aidan@php.net ("Aidan Lister") > But since there's no BC need to allow resources in array initialization, > then sure, leave it to the scripter to cast it to an int if that's REALLY > what they want. (Again "why?" comes to mind). PEAR::DB uses this method - I'm seeing a million errors on sites that have updated to latest CVS version. You're forced to i use this method if you want to link a resource back to it's creation information. If you have an array of IPs, and you create an array of resources from each IP, a third array linking the IP back to the casted interger value of the resource is required if you want to get the IP back. (This is very confusing to write). Here's an example: I hope that demonstrates the purpose properly. Ofcourse this method can still be used, it just requires an extra cast (which is a cleaner solution anyway). Regards, Aidan