Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42411 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51733 invoked from network); 30 Dec 2008 15:44:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Dec 2008 15:44:20 -0000 Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain prohost.org from 64.233.170.187 cause and error) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 64.233.170.187 rn-out-0910.google.com Received: from [64.233.170.187] ([64.233.170.187:27819] helo=rn-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 99/B2-29733-2D14A594 for ; Tue, 30 Dec 2008 10:44:19 -0500 Received: by rn-out-0910.google.com with SMTP id k40so3551621rnd.0 for ; Tue, 30 Dec 2008 07:44:15 -0800 (PST) Received: by 10.65.214.19 with SMTP id r19mr11505241qbq.20.1230651855266; Tue, 30 Dec 2008 07:44:15 -0800 (PST) Received: from ?192.168.1.132? (CPE0018f8c0ee69-CM000f9f7d6664.cpe.net.cable.rogers.com [72.138.241.182]) by mx.google.com with ESMTPS id s31sm35231981qbs.4.2008.12.30.07.44.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 30 Dec 2008 07:44:14 -0800 (PST) Cc: PHP Development Message-ID: <4F69DDCE-D546-47B0-B0BE-169ED695FAD6@prohost.org> To: Antony Dovgal In-Reply-To: <495A3C7F.4060209@daylessday.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Tue, 30 Dec 2008 10:44:12 -0500 References: <0EF4028C-3E68-418F-A7CF-FCBF7B1163C4@gmail.com> <727FD055-A318-4E58-96C1-56936F422D62@prohost.org> <4959EA5C.3030501@daylessday.org> <12B6F346-9432-4515-96AF-6CF09C5B58A4@prohost.org> <495A3C7F.4060209@daylessday.org> X-Mailer: Apple Mail (2.930.3) Subject: Re: [PHP-DEV] Re: [PHP] POSIX 1003.1-2001 gethostname(2) From: ilia@prohost.org (Ilia Alshanetsky) On 30-Dec-08, at 10:21 AM, Antony Dovgal wrote: > On 30.12.2008 18:15, Ilia Alshanetsky wrote: >> What is the benefit of the new API, documents better, has a longer >> name, helps some fuzzing suit to determine if functions take args or >> not? > > It produces much better & verbose error messages error messages. > Take a look at these for example: > 5_3> ./sapi/cli/php -r 'strlen(1,2,3);' > Warning: strlen() expects exactly 1 parameter, 3 given in Command > line code on line 1 > > 5_3> ./sapi/cli/php -r 'strlen(array());' > Warning: strlen() expects parameter 1 to be string, array given in > Command line code on line 1 > > 5_2> ./sapi/cli/php -r 'strlen(1,2,3);' > Warning: Wrong parameter count for strlen() in Command line code on > line 1 > > Notice the difference? Cool, that's a good change, I'll keep it mind for future code. >> Also, is this documented anywhere? > > .._none() might be not documented, but it's used everywhere. > I believe it should be mentioned in README.PARAMETER_PARSING_API if > it's not there yet. Yes, that would be helpful to have in there. Ilia Alshanetsky