Hi!
>> - Variables may be used as input to out/ref arguments. Properties
>> may not.
This will probably be true for properties too, in some cases. However,
it is in no way an advantage.
>> - Properties may throw exceptions - variables will never do that.
In PHP, properties can not throw excepti
in an unstable state
however" as Derick mentions on his post about E_RECOVERABLE_ERROR.
> -Original Message-
> From: Anthony Ferrara [mailto:ircmax...@gmail.com]
> Sent: Tuesday, April 24, 2012 10:40 AM
> To: Clint Priest
> Cc: internals@lists.php.net
> Subject:
et
Subject: Re: [PHP-DEV] RFC: Property get/set syntax (added isset/unset and
references)
Hi!
> would it be possible to add a second shorthand syntax to the complete
> automatic implementation?
>
> Examples:
>
> class TimePeriod
> {
> public $Hours {};
> publ
that interface.
-Original Message-
From: Stas Malyshev [mailto:smalys...@sugarcrm.com]
Sent: Tuesday, April 24, 2012 12:34 PM
To: Clint Priest
Cc: internals@lists.php.net
Subject: Re: [PHP-DEV] RFC: Property get/set syntax (added isset/unset and
references)
Hi!
> These would also
Hi!
> These would also include automatic implementations which call the
> respective functions on the backing field. I could see only allowing
> isset/unset automatic implementations if get/set were also specified
> as automatic implementations.
Another thing about that. The "automatic implement
Hi!
> public $dataArray {
>
> &get { return &$this->_dataArray; }
This is not correct. Please read:
http://php.net/manual/en/language.references.return.php
> These would also include automatic implementations which call the
> respective functions on the backing field. I could see only allowin
Hi!
> would it be possible to add a second shorthand syntax to the complete
> automatic implementation?
>
> Examples:
>
> class TimePeriod
> {
> public $Hours {};
> public property $Hours;
> public $Hours {property};
> }
How it is different from just public $Hours and why one would
Clint,
Additionally, one more comment related to the read-only and
write-only. I noticed that you're using E_ERROR for improper access.
Obviously you don't want this to be a warning, as the execution
shouldn't continue because that would be undefined. However, what
about setting it to E_RECOVERA
Hi!
would it be possible to add a second shorthand syntax to the complete
automatic implementation?
Examples:
class TimePeriod
{
public $Hours {};
public property $Hours;
public $Hours {property};
}
That could save quite some typing.
Overall, i really like it.
On Tue, Apr 24, 2012
Clint,
Very nice job overall! Looking quite good.
> Alternatively we could throw an error to a call on isset and/or unset
> against a property which didn't define an implementation.
I don't care for that concept much. All it's doing is trading one set
of boilerplate for another. I'd prefer
10 matches
Mail list logo