Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:56728 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45359 invoked from network); 2 Dec 2011 17:07:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Dec 2011 17:07:48 -0000 X-Host-Fingerprint: 208.107.21.52 host-52-21-107-208.midco.net Date: Fri, 02 Dec 2011 12:07:46 -0500 Received: from [208.107.21.52] ([208.107.21.52:13033] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 84/74-16911-1E509DE4 for ; Fri, 02 Dec 2011 12:07:46 -0500 Message-ID: <84.74.16911.1E509DE4@pb1.pair.com> To: internals@lists.php.net References: <4ED6713D.2050009@ralphschindler.com> <4ED67DCB.5090102@ralphschindler.com> <4ED68940.3050502@ralphschindler.com> <90D867E2-E6FB-481D-B57C-911E5FE6A418@gmail.com> <4ED7BAC2.20805@ralphschindler.com> <9B.03.16911.EB109DE4@alliantinternet.com> <011701ccb113$2bdcfe20$8396fa60$@alliantinternet.com> User-Agent: slrn/pre1.0.0-18 (Linux) X-Posted-By: 208.107.21.52 Subject: Re: [PHP-DEV] 5.4's New De-referencing plus assignment From: weierophinney@php.net (Matthew Weier O'Phinney) On 2011-12-02, "Dmitri Snytkine" 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