# Disabling arginfo argument type checks for internal functions

- Thread: https://externals.io/message/105851
- Original archive: https://news-web.php.net/php.internals/105851
- Started by Nikita Popov on 2019-06-06T12:41:51+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #105851 — Nikita Popov — 2019-06-06T12:41:51+00:00

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

Hi internals,

I plan to disable the checking of arginfo argument types for internal
functions in https://github.com/php/php-src/pull/4232 (PHP 8 only). This is
necessary to avoid duplicate type checks in both arginfo and zpp. Once this
lands, PRs to add arginfo types (available through reflection) to internal
functions will be accepted.

As a sanity check, debug builds will make sure that the function call
either throws or passes arginfo type checks -- this will help avoid the
additional of arginfo types that are not correct enforced by the
implementation.

Regards,
Nikita

---

## #105861 — Sara Golemon — 2019-06-07T14:44:43+00:00

URL: https://externals.io/message/105851#105861

> I plan to disable the checking of arginfo argument types for internal
> functions in https://github.com/php/php-src/pull/4232 (PHP 8 only). This
> is
> necessary to avoid duplicate type checks in both arginfo and zpp. Once this
> lands, PRs to add arginfo types (available through reflection) to internal
> functions will be accepted.
>
> Yay! We can finally get decent reflection for internal function signatures!

-Sara

---

## #105957 — Nikita Popov — 2019-06-17T12:54:59+00:00

URL: https://externals.io/message/105851#105957

> Hi internals,
>
> I plan to disable the checking of arginfo argument types for internal
> functions in https://github.com/php/php-src/pull/4232 (PHP 8 only). This
> is necessary to avoid duplicate type checks in both arginfo and zpp. Once
> this lands, PRs to add arginfo types (available through reflection) to
> internal functions will be accepted.
>
> As a sanity check, debug builds will make sure that the function call
> either throws or passes arginfo type checks -- this will help avoid the
> additional of arginfo types that are not correct enforced by the
> implementation.
>

These changes have now landed. This means that arginfo types (both argument
and return) can now be added to internal functions. See
https://github.com/php/php-src/commit/227a9c75ec01800cb2b02d58ab74ec72abccf478
for a small sample. PRs are welcome :)

Nikita
