Re: References

From: Date: Fri, 14 Jul 2000 08:34:54 +0000
Subject: Re: References
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-24509@lists.php.net to get a copy of this message
Stanislav Malyshev wrote: > KK>> keywords, organizing them in one or multiple tree structures, > KK>> referencing each keyword zero, once (common case) or multiple > KK>> times from different locations in the tree. > > You shouldn't use PHP references for this. Assignment does the same > (actually, there are cases it does better) if you don't need to write it, > and I have hard time seeing why you need to write keywords. You can't copy without giving up the ability to have a single keyword in multiple locations in the tree. Generalized: You cannot arrange pooled data in multiple structures without using references. Consider for example a number of measurements, for example usage rates of multple router ports over time. You'd want to pool this data and then build structures of these measurements organizing them over time, over location, over IP source and so on. You'd do this by building arrays of references to the actual measurements, ordered by the characteristic you need. You'd use measurements in order to avoid duplication of the data, and in order to avoid update anomalies. Kristian -- Kristian Köhntopp, NetUSE AG Siemenswall, D-24107 Kiel Tel: +49 431 386 436 00, Fax: +49 431 386 435 99 Using PHP3? See our web development library at http://phplib.netuse.de/

« previous php.dev (#24509) next »