Re: 5.4's New De-referencing plus assignment

From: Date: Fri, 02 Dec 2011 17:07:46 +0000
Subject: Re: 5.4's New De-referencing plus assignment
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-56728@lists.php.net to get a copy of this message
On 2011-12-02, "Dmitri Snytkine" <dsnytkine@Ultralogistics.com> wrote: > IT would probably be even more convenient to just say > if( (new Validator())->isValid($value) ){ > > } > > No reason to just temporaraly assign $validator. Except that you can't get the validation error messages if validation fails. That was the point of assigning -- error messages are stateful properties of the validator. -- Matthew Weier O'Phinney Project Lead | matthew@zend.com Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

« previous php.internals (#56728) next »