Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:61150 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99804 invoked from network); 12 Jul 2012 01:38:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jul 2012 01:38:20 -0000 Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:46441] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CC/10-32936-B8A2EFF4 for ; Wed, 11 Jul 2012 21:38:20 -0400 Received: from [192.168.2.230] (ppp-188-174-46-44.dynamic.mnet-online.de [188.174.46.44]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id C26A4626F5; Thu, 12 Jul 2012 03:38:16 +0200 (CEST) To: Anthony Ferrara Cc: Nikita Popov , PHP internals In-Reply-To: References: <1342050547.1456.33.camel@guybrush> Content-Type: text/plain; charset="UTF-8" Date: Thu, 12 Jul 2012 03:38:15 +0200 Message-ID: <1342057095.1456.45.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Internal iteration API From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Wed, 2012-07-11 at 20:39 -0400, Anthony Ferrara wrote: > Johannes, > > One thing to keep in mind when doing this is to think about consistency. > > > > I think that's a huge point not to be taken lightly. For that reason, I > think that this API should not be used for any of the array_* functions. > Meaning that array_sum(), etc should all take arrays only. > > Then, other non-array functions (such as str_replace, etc) can be modified > to use this new method. Not sure that's more consistent then. For having a _quick_ guess on how many functions might be affected, roughly, I did a simple grep: $ grep -cE 'zend_parse_parameters(_ex)?[^"]*"[^"]*[aAhH][^"]*"' \ ext/*/*.c Zend/zend_builtin_functions.c | grep -v :0 ext/curl/interface.c:1 ext/date/php_date.c:2 ext/dom/xpath.c:1 ext/filter/filter.c:1 ext/gd/gd.c:5 ext/iconv/iconv.c:1 ext/imap/php_imap.c:2 ext/ldap/ldap.c:2 ext/mysqli/mysqli_embedded.c:1 ext/mysqli/mysqli_nonapi.c:1 ext/odbc/php_odbc.c:1 ext/openssl/openssl.c:12 ext/pcntl/pcntl.c:4 ext/pcre/php_pcre.c:1 ext/pdo_pgsql/pgsql_driver.c:1 ext/pdo/pdo_dbh.c:2 ext/pdo/pdo_stmt.c:2 ext/pgsql/pgsql.c:11 ext/phar/phar_object.c:2 ext/reflection/php_reflection.c:3 ext/soap/soap.c:3 ext/sockets/sockets.c:1 ext/spl/spl_directory.c:1 ext/spl/spl_fixedarray.c:1 ext/spl/spl_iterators.c:1 ext/standard/array.c:43 ext/standard/basic_functions.c:4 ext/standard/file.c:1 ext/standard/proc_open.c:1 ext/standard/streamsfuncs.c:5 ext/sysvmsg/sysvmsg.c:1 ext/xmlrpc/xmlrpc-epi-php.c:4 ext/xsl/xsltprocessor.c:2 ext/zip/php_zip.c:2 In total 126 matches. Now somebody has to go quickly over them ;-) johannes