Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31481 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87191 invoked by uid 1010); 7 Aug 2007 20:26:54 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 87174 invoked from network); 7 Aug 2007 20:26:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Aug 2007 20:26:54 -0000 X-Host-Fingerprint: 201.235.81.26 26-81-235-201.fibertel.com.ar Date: Tue, 07 Aug 2007 16:26:52 -0400 Received: from [201.235.81.26] ([201.235.81.26:25420] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 33/28-39276-A85D8B64 for ; Tue, 07 Aug 2007 16:26:52 -0400 Message-ID: <33.28.39276.A85D8B64@pb1.pair.com> To: internals@lists.php.net References: <257742794.20070807142252@marcus-boerger.de> <46B8CFC2.7030308@zend.com> User-Agent: pan 0.120 (Plate of Shrimp) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Posted-By: 201.235.81.26 Subject: Re: [PHP-DEV] [PATCH] Getopt with longopts and windows support - part 2 From: dsp@php.net (David Soria Parra) > Why one would need getopt outside of cgi/cli? I.e. where would these > options come from? initially the idea was to use getopt on windows machines. After proposing my patch which just includes the NetBSD getopt(), there was a recommandation in php.pecl to use the php_getopt instead of the system provided getopt to implement the PHP_FUNCTION(getopt). This imho makes sense. We got windows support as well as long parameter support. As we use it in ext/standard/basic_functions.c we have to move the getopt.c out of sapi/cli.