Re: [lists.php] Re: [PHP-DEV] property de-referencing

From: Date: Tue, 30 Apr 2013 20:58:21 +0000
Subject: Re: [lists.php] Re: [PHP-DEV] property de-referencing
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-67224@lists.php.net to get a copy of this message
I don't think that's necessary - the point of being able to do this, is to apply meta-programming techniques, so in most situations, what matters is the ability to quickly create object/property-references... using them will usually happen inside some service component, e.g. a form-helper or object/relational-mapper. Having a short syntax for that is much less relevant - what matters if easy (and of course static) creation of references to those objects/properties. On Tue, Apr 30, 2013 at 4:36 PM, ALeX <lists.php@tx0.eu> wrote: > Just an idea: why not also use ^ (or another operator) to access the > value? (maybe as an additional way to get/setValue) > > $foo = ^$user->name; > > echo 'Hello '.^$foo; > ^$foo = 'Bob'; > > (using the same operator will conflict when you are accessing a > property of an object which is a PropertyReference) >

« previous php.internals (#67224) next »