Interfaces are used to define what methods must be present, properties are not 
allowed.

Yes, so no one should be correct, right?
I mean, yes the first declaration implies some code; but for the interface, 
it's still a property definition.

You're mixing concepts here, it's an accessor definition, not a property 
definition.  property != accessor, an accessor just happens to look and act 
like a property (which is the point of accessors).

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]<mailto:[email protected]>] On Behalf 
Of Amaury Bouchard
Sent: Saturday, October 13, 2012 5:06 AM
To: Nikita Popov
Cc: Benjamin Eberlei; Clint Priest; 
[email protected]<mailto:[email protected]>

Subject: Re: [PHP-DEV] [PHP-DEV [RFC] Property Accessors v1.2

2012/10/13 Nikita Popov <[email protected]<mailto:[email protected]>>
    interface Foo {
        // this is okay
        public $abc { get; set; }

        // this is invalid
        public $abc;
    }

Sorry, I missed something. Why the first should be correct but not the second 
one?
For me it's exactly the same thing.

Reply via email to