Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81204 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17106 invoked from network); 27 Jan 2015 08:41:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jan 2015 08:41:08 -0000 Authentication-Results: pb1.pair.com header.from=martin.keckeis1@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=martin.keckeis1@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.175 as permitted sender) X-PHP-List-Original-Sender: martin.keckeis1@gmail.com X-Host-Fingerprint: 209.85.214.175 mail-ob0-f175.google.com Received: from [209.85.214.175] ([209.85.214.175:56053] helo=mail-ob0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DD/15-17708-02F47C45 for ; Tue, 27 Jan 2015 03:41:06 -0500 Received: by mail-ob0-f175.google.com with SMTP id wp4so12297946obc.6 for ; Tue, 27 Jan 2015 00:41:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=04glcp2h6wixOqunaL5DGerBaa2fVhx84I+2vYNqWEw=; b=yyrSAzrXteLLiMRfHOQNH1T7tC7CcDYao9zfixejLM0C3Y2Pf0iy5dpnjVvYXS2Q4m AnlG07sH//1vbnTBOS868WII/RjNfcKzAro/P9jCNFKAxvBQ+R0U6JThX1wR/s1tt+4X VQz2S+Aa27bKuJoI/zWnjV2tkAiei4TPxrjcIkCSWzK4z/E9xxOjcFljTvFdlRZJOK3H +I6Q3NmejjnnqEkiQYi4tJODdhUG8QcgXe0DwUF2aVdfUhrNSfzPp/WevcQE7W1gAhE7 j0xr4EFmuZHi6kZJvfIK7Ravy/B0BVHRpdiZReQJJpuXgq4I5igRHuruDBb1izW5/tTn uqDg== MIME-Version: 1.0 X-Received: by 10.60.54.199 with SMTP id l7mr60078oep.37.1422348062168; Tue, 27 Jan 2015 00:41:02 -0800 (PST) Received: by 10.202.232.139 with HTTP; Tue, 27 Jan 2015 00:41:02 -0800 (PST) In-Reply-To: References: Date: Tue, 27 Jan 2015 09:41:02 +0100 Message-ID: To: Yasuo Ohgaki Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=089e0115ffbcfe213f050d9e36bc Subject: Re: [PHP-DEV] Re: Deprecating all INI set/get functions and use ini_set/get() From: martin.keckeis1@gmail.com (Martin Keckeis) --089e0115ffbcfe213f050d9e36bc Content-Type: text/plain; charset=UTF-8 Hello, 2015-01-27 3:20 GMT+01:00 Yasuo Ohgaki : > Hi all, > > On Sun, Jan 25, 2015 at 9:29 AM, Yasuo Ohgaki wrote: > > > I would like to propose INI set/get function deprecation, raise > > E_DEPRECATED, > > and make PHP_INI_MH() use the CODING_STANDARDS. > > > > For example, session module has following INI set/get functions > > > > - http://php.net/manual/en/function.session-save-path.php > > - http://php.net/manual/en/function.session-module-name.php > > - http://php.net/manual/en/function.session-cache-expire.php > > - http://php.net/manual/en/function.session-cache-limiter.php > > - http://php.net/manual/en/function.session-name.php > > > > There are 5 PHP functions for session module alone. Some of them include > > runtime check, but > > these checks can be done with PHP_INI_MH() by using state parameter. In > > fact, runtime > > check should be done in PHP_INI_MH() to avoid bugs. > > > > Use of ini_set/get() has following pros and cons > > > > Pros > > - Less API, hence simpler API. > > - Modules will be less buggy. > > i.e. PHP_INI_MH() must handle "state" properly, but it tends to be > > forgotten, 3rd party modules especially. > > - Consistent coding style/API across modules, both internal and script. > > - Reduced documentations. INI descriptions are only in INI section. > > - Less documentations, hence less documentation bugs. > > - Better documentation. All user needs to know will be in INI section. > > - Awareness of INI setting use. Users are better to know they are using > > INI. i.e. All INI values has the same limitations, > > INI_SYSTEM/INI_PERDIR/INI_USER, stage limitations if any. > > - (Please point it out more advantages) > > > > Cons > > - Existing code modifications. (It's E_DEPRECATED. User may ignore.) > > - (Please point it out more disadvantages) > > > > Comments are appreciated. > > > > Regards, > > > > P.S. Enum for PHP_INI_MH() "stage" parameter type is better in PHP7. IMO. > > > > Since there isn't comment, I guess everyone on this list agree this > proposal. > > Shall I start writing this RFC? > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net > This would also deprecate following functions? http://php.net/manual/en/function.gc-enable.php http://php.net/manual/en/function.set-include-path.php http://php.net/manual/en/function.set-time-limit.php http://php.net/manual/en/function.error-reporting.php --089e0115ffbcfe213f050d9e36bc--