# boolval() again

- Thread: https://externals.io/message/60750
- Original archive: https://news-web.php.net/php.internals/60750
- Started by David Soria Parra on 2012-06-06T07:42:39+00:00
- Messages: 9
- 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

---

## #60750 — David Soria Parra — 2012-06-06T07:42:39+00:00

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

Going through the 26 open pull requests (please let us work on getting
that number down), I stumbled over https://github.com/php/php-src/pull/60.

This was already proposed on the mailinglits, but the thread died fast without
a satisfying answer on whether to add a function `boolval()` or not.

Personally I would like to see the function in. Having a complete set
of XYZval() functions is a good reason for me to add that function. The
implementation is simple and straight forward and easy to maintain.

Do we need an RFC for that simple pull request or can we just go ahead
and pull it?

David

---

## #60751 — Stas Malyshev — 2012-06-06T07:48:52+00:00

URL: https://externals.io/message/60750#60751 · In reply to: #60750

Hi!

> Going through the 26 open pull requests (please let us work on getting
> that number down), I stumbled over https://github.com/php/php-src/pull/60.
> 
> This was already proposed on the mailinglits, but the thread died fast without
> a satisfying answer on whether to add a function `boolval()` or not.

I think `boolval()` is fine, but implementation seems to be overly
complicated - why not just use zend_is_true?

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #60755 — Derick Rethans — 2012-06-06T09:51:34+00:00

URL: https://externals.io/message/60750#60755 · In reply to: #60750

David Soria Parra <dsp@php.net> wrote:

> Going through the 26 open pull requests (please let us work on getting
> that number down), I stumbled over
> https://github.com/php/php-src/pull/60.
> 
> This was already proposed on the mailinglits, but the thread died fast
> without
> a satisfying answer on whether to add a function `boolval()` or not.
> 
> Personally I would like to see the function in. Having a complete set
> of XYZval() functions is a good reason for me to add that function.
> The
> implementation is simple and straight forward and easy to maintain.
> 
> Do we need an RFC for that simple pull request or can we just go ahead
> and pull it?
Pull it.

Derick

---

## #60756 — Pierre Joye — 2012-06-06T10:08:50+00:00

URL: https://externals.io/message/60750#60756 · In reply to: #60755

hi,

Pull it but I would still do a RFC to clearly document it (exact
behaviors), which could be then used by the doc team and to implement
tests.


> David Soria Parra <dsp@php.net> wrote:
>
> > […]
> Pull it.
>
> Derick
>
> --
> 
> 
>



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

---

## #60759 — Felipe Pena — 2012-06-06T11:29:31+00:00

URL: https://externals.io/message/60750#60759 · In reply to: #60756

Hi,

2012/6/6 Pierre Joye <pierre.php@gmail.com>:
> hi,
>
> Pull it but I would still do a RFC to clearly document it (exact
> behaviors), which could be then used by the doc team and to implement
> tests.
>
> 
> > […]
>
>

Pull it! About the RFC, I think isn't necessary as the behavior is
obvious, i.e. it behaves like a cast to bool.

-- 
Regards,
Felipe Pena

---

## #60766 — Kris Craig — 2012-06-06T19:40:54+00:00

URL: https://externals.io/message/60750#60766 · In reply to: #60759

> Hi,
>
> 2012/6/6 Pierre Joye <pierre.php@gmail.com>:
> > […]
>
> Pull it! About the RFC, I think isn't necessary as the behavior is
> obvious, i.e. it behaves like a cast to bool.
>
> --
> Regards,
> Felipe Pena
>
> --
> 
> 
>
>
IMHO since it represents a language change (albeit a minor one) I agree
with Pierre that an RFC wouldn't hurt.  If nothing else it's just a good
habit to get into I think.

--Kris

---

## #60767 — Gustavo Lopes — 2012-06-06T19:48:51+00:00

URL: https://externals.io/message/60750#60767 · In reply to: #60766

On Wed, 06 Jun 2012 21:40:54 +0200, Kris Craig <kris.craig@gmail.com>  
wrote:

> IMHO since it represents a language change (albeit a minor one) I agree
> with Pierre that an RFC wouldn't hurt.  If nothing else it's just a good
> habit to get into I think.
>

Adding a function or class most definitely is not a language change  
(unless they have some special treatment like Iterator), unless you  
consider all the core functions and classes to be part of the language, at  
which point everything is a language change.

An RFC for such a trivial change is an utter waste of time IMO.

-- 
Gustavo Lopes

---

## #60768 — Hannes Magnusson — 2012-06-06T20:18:23+00:00

URL: https://externals.io/message/60750#60768 · In reply to: #60750

>

> Do we need an RFC for that simple pull request or can we just go ahead
> and pull it?

Please don't waste your time on an rfc for it. If you really want to write
anything, write the doc.

-Hannes

---

## #60773 — Pierre Joye — 2012-06-07T07:41:03+00:00

URL: https://externals.io/message/60750#60773 · In reply to: #60767

hi Gustavo,



> Adding a function or class most definitely is not a language change (unless
> they have some special treatment like Iterator), unless you consider all the
> core functions and classes to be part of the language, at which point
> everything is a language change.

boolval like other type related functions are not languages constructs
per se but parts of the very core of PHP, so same treatment applies.

> An RFC for such a trivial change is an utter waste of time IMO.

I would not say waste of time, but for the long term record and
clarity, a RFC should always be written, no matter how short (i.e.
boolval) or long (i.e. intl additions) it is.

Cheers,
-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
