# question regarding #67309

- Thread: https://externals.io/message/74702
- Original archive: https://news-web.php.net/php.internals/74702
- Started by Ferenc Kovacs on 2014-06-03T07:41:39+00:00
- Messages: 7
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #74702 — Ferenc Kovacs — 2014-06-03T07:41:39+00:00

URL: https://externals.io/message/74702#74702

Hi,

I wanted to ask what's our current consensus about feature requests like
this: https://bugs.php.net/bug.php?id=67309
The requested function wouldn't provide anything which isn't currently
available via `ini_get()`, but it would be a bit natural to expect a get
method where a set exists.

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

---

## #74704 — Andrey Andreev — 2014-06-03T11:01:18+00:00

URL: https://externals.io/message/74702#74704 · In reply to: #74702

> Hi,
>
> I wanted to ask what's our current consensus about feature requests like
> this: https://bugs.php.net/bug.php?id=67309
> The requested function wouldn't provide anything which isn't currently
> available via `ini_get()`, but it would be a bit natural to expect a get
> method where a set exists.
>
> --
> Ferenc Kovács
> @Tyr43l - http://tyrael.hu

Hi,

We talked about this with Yasuo in regards to some ext/session stuff
(although it was about setters) and agreed on keeping `ini_set()` only.
He even wrote a quick RFC about it:
https://wiki.php.net/rfc/deprecate-ini-functions

My opinion in general is that we don't need functions that duplicate
 `ini_set()`, `ini_get()` for a particular setting and existing ones should
be removed in the future instead of adding more to complement them. No
idea what other people think about it though.

Cheers,
Andrey.

---

## #74706 — Ferenc Kovacs — 2014-06-03T12:30:05+00:00

URL: https://externals.io/message/74702#74706 · In reply to: #74704

> 
> > […]
>
> Hi,
>
> We talked about this with Yasuo in regards to some ext/session stuff
> (although it was about setters) and agreed on keeping `ini_set()` only.
> He even wrote a quick RFC about it:
> https://wiki.php.net/rfc/deprecate-ini-functions
>
>
Yeah, but AFAIR we didn't come up with an agreement (other than reverting
out a couple of new functions from PHP 5.6.0).


> My opinion in general is that we don't need functions that duplicate
> `ini_set()`, `ini_get()` for a particular setting and existing ones should
> be removed in the future instead of adding more to complement them. No
> idea what other people think about it though.
>

I agree that providing multiple ways to achive the same thing is not really
useful.
But we also have to decide whether or not it is worth the BC to remove some
existing function only because one can already do the same thing via
ini_set.
Another (albeit maybe a bit far-fetched) aspect is that somebody could
assume that he/she can restrict a setting via disabling the appropriate
function(via disable_functions) while that can be bypassed through the
ini_set or vica versa.
So the more ways we provide for the same setting to be set it is more
likely that somebody forgets protecting one of those.

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

---

## #74708 — Andrey Andreev — 2014-06-03T12:46:00+00:00

URL: https://externals.io/message/74702#74708 · In reply to: #74706

Hi,


>
>
>
> 
> > […]
>
> Yeah, but AFAIR we didn't come up with an agreement (other than reverting
> out a couple of new functions from PHP 5.6.0).

We didn't indeed, I was just giving you partial feedback. :)

> > […]
>
>
> I agree that providing multiple ways to achive the same thing is not really
> useful.
> But we also have to decide whether or not it is worth the BC to remove some
> existing function only because one can already do the same thing via
> ini_set.

With work supposedly being started on PHP6, now is the right time to
make that decision. :)

> Another (albeit maybe a bit far-fetched) aspect is that somebody could
> assume that he/she can restrict a setting via disabling the appropriate
> function(via disable_functions) while that can be bypassed through the
> ini_set or vica versa.
> So the more ways we provide for the same setting to be set it is more likely
> that somebody forgets protecting one of those.

Exactly.

Cheers,
Andrey.

---

## #78147 — Ferenc Kovacs — 2014-10-17T15:34:57+00:00

URL: https://externals.io/message/74702#78147 · In reply to: #74708

> Hi,
>
> 
> > […]
> wrote:
> > […]
> like
> > […]
>
> We didn't indeed, I was just giving you partial feedback. :)
>
> > […]
> really
> > […]
> some
> > […]
>
> With work supposedly being started on PHP6, now is the right time to
> make that decision. :)
>
> > […]
> likely
> > […]
>
> Exactly.
>
> Cheers,
> Andrey.
>

resurrecting this thread in the hope of getting a bit more feedback.

-- 
Ferenc Kovács
@Tyr43l - http://tyrael.hu

---

## #78152 — Stas Malyshev — 2014-10-18T07:20:20+00:00

URL: https://externals.io/message/74702#78152 · In reply to: #78147

Hi!

> resurrecting this thread in the hope of getting a bit more feedback.

About removing functions - I don't really see any particular win in it.
I mean, we'd have enough BC concerns in PHP 7 without having to worry
about missing functions that didn't hurt anybody. However, it may be
fine to add a note in the manual saying "please use ini_*, it's better
style" or something like that.

About adding getter for execution time - not sure if there's any
practical need for it, though I wouldn't lose sleep if it were added :)
-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/

---

## #78248 — Andrey Andreev — 2014-10-22T21:07:38+00:00

URL: https://externals.io/message/74702#78248 · In reply to: #78152

Hi,


> Hi!
>
> > […]
>
> About removing functions - I don't really see any particular win in it.
> I mean, we'd have enough BC concerns in PHP 7 without having to worry
> about missing functions that didn't hurt anybody. However, it may be
> fine to add a note in the manual saying "please use ini_*, it's better
> style" or something like that.

My suggestion was to deprecate them first, which isn't much different
to adding a doc note that ini_*() is better.

Cheers,
Andrey.
