Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:42410 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48745 invoked from network); 30 Dec 2008 15:21:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Dec 2008 15:21:58 -0000 Authentication-Results: pb1.pair.com header.from=tony@daylessday.org; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tony@daylessday.org; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain daylessday.org designates 89.208.40.236 as permitted sender) X-PHP-List-Original-Sender: tony@daylessday.org X-Host-Fingerprint: 89.208.40.236 mail.daylessday.org Linux 2.6 Received: from [89.208.40.236] ([89.208.40.236:45531] helo=daylessday.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A7/42-29733-49C3A594 for ; Tue, 30 Dec 2008 10:21:57 -0500 Received: from [192.168.3.48] (unknown [212.42.62.198]) by daylessday.org (Postfix) with ESMTPSA id AF925D0240; Tue, 30 Dec 2008 18:21:53 +0300 (MSK) Message-ID: <495A3C7F.4060209@daylessday.org> Date: Tue, 30 Dec 2008 18:21:35 +0300 User-Agent: Thunderbird 2.0.0.18 (X11/20081112) MIME-Version: 1.0 To: Ilia Alshanetsky CC: PHP Development 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> In-Reply-To: <12B6F346-9432-4515-96AF-6CF09C5B58A4@prohost.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: [PHP] POSIX 1003.1-2001 gethostname(2) From: tony@daylessday.org (Antony Dovgal) 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? > 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. -- Wbr, Antony Dovgal