That looks more pointless than evil to me - and no, I'm not suggesting
anything of that sort.

I'm proposing we need a way to statically reference an object property -
the object property itself, not it's value:

    var_dump($user->name); // => 'Rasmus'

    var_dump(^$user->name); // => PropertyReference(class: 'User',
propertyName: 'name', object:User(...))

    $foo = ^$user->name;

    var_dump($foo->getValue()); // => 'Rasmus'

    $foo->setValue('Bob');

    var_dump($user->name); // => 'Bob'

Is that easier to understand?

- Rasmus Schultz


On Tue, Apr 30, 2013 at 1:01 PM, Ferenc Kovacs <tyr...@gmail.com> wrote:

>
> 2013.04.30. 14:00, "Rasmus Schultz" <ras...@mindplay.dk> ezt írta:
>
> >
> > >
> > > Do you mean something yucky like http://pecl.php.net/propro?
> > >
> > >
> > I don't know what that is, and there is no description on that page.
>
> you can grasp the concept from the testcase:
>
> http://git.php.net/?p=pecl/php/propro.git;a=blob_plain;f=tests/001.phpt;hb=HEAD
>
>

Reply via email to