# Array type hinting for internal functions..

- Thread: https://externals.io/message/24133
- Original archive: https://news-web.php.net/php.internals/24133
- Started by Hannes Magnusson on 2006-06-15T17:21:04+00:00
- Messages: 3
- 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

---

## #24133 — Hannes Magnusson — 2006-06-15T17:21:04+00:00

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

Hi all

I am sure this was decided upon long time ago, but there seem to be
few out there that do not want this...
should I revert array type hinting for internal functions or continue
adding them were appropriate while I add the argument info?

Just to be clear; I'm introducing array type hinting for all internal
functions expecting array and removing therefor useless array type
checks inside the functions.
These changes however introduce tiny backward compatibility break
since it'll emit E_RECOVERABLE rather than E_WARNING...

-Hannes

---------- Forwarded message ----------
From: Hannes Magnusson <bjori@php.net>
Date: Jun 15, 2006 6:25 PM
Subject: [PHP-CVS] cvs: php-src /ext/curl interface.c  /ext/dbase
dbase.c  /ext/gd gd.c
To: php-cvs@lists.php.net


bjori           Thu Jun 15 16:25:12 2006 UTC

  Modified files:
    /php-src/ext/dbase  dbase.c
    /php-src/ext/gd     gd.c
    /php-src/ext/curl   interface.c
  Log:
  Add array type hinting
  Remove unnecessary array checkes

---

## #24139 — Lukas Smith — 2006-06-15T21:19:15+00:00

URL: https://externals.io/message/24133#24139 · In reply to: #24133

Hannes Magnusson wrote:
> Hi all
> 
> I am sure this was decided upon long time ago, but there seem to be
> few out there that do not want this...
> should I revert array type hinting for internal functions or continue
> adding them were appropriate while I add the argument info?
> 
> Just to be clear; I'm introducing array type hinting for all internal
> functions expecting array and removing therefor useless array type
> checks inside the functions.
> These changes however introduce tiny backward compatibility break
> since it'll emit E_RECOVERABLE rather than E_WARNING...

Is this a similar change as the `array_merge()` change?

regards,
Lukas

---

## #24140 — Hannes Magnusson — 2006-06-15T21:36:10+00:00

URL: https://externals.io/message/24133#24140 · In reply to: #24139

> Hannes Magnusson wrote:
> > […]
>
> Is this a similar change as the `array_merge()` change?

If the functions do castings it won't get type hinted array, but those
who specifically expect array, and bail out when they get whatever
else, will get type hinted array.

-Hannes
