# Function type hinting

- Thread: https://externals.io/message/34264
- Original archive: https://news-web.php.net/php.internals/34264
- Started by Sam Barrow on 2007-12-27T18:17:16+00:00
- Messages: 4
- 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

---

## #34264 — Sam Barrow — 2007-12-27T18:17:16+00:00

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

I read that type hinting for function return values was going to be
implemented, is this true? If not, is it something that could be
implemented if I were to write a patch?

---

## #34302 — Marcus Boerger — 2007-12-30T17:54:59+00:00

URL: https://externals.io/message/34264#34302 · In reply to: #34264

Hello Sam,

  we actually thought of doing it, yes. And apparently I wanted to do
something but I didn't find any time in the past year to be honest.

marcus

Thursday, December 27, 2007, 7:17:16 PM, you wrote:

> I read that type hinting for function return values was going to be
> implemented, is this true? If not, is it something that could be
> implemented if I were to write a patch?




Best regards,
 Marcus

---

## #34309 — Markus Fischer — 2007-12-31T22:33:21+00:00

URL: https://externals.io/message/34264#34309 · In reply to: #34302

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I'm monitoring this subject closely because for me and my inner Zen,
having type hint next to namespaces is one of *the* things I'm looking
forward.

Now the current subject was only about return values, for me I'm looking
for the big picture, having scalar type hints every where possible.

I was using Sam's patch for some tests and was very satisfied with.

Besides type hinting for all types, my only left wish is a more
integrated usage of Exception (UnknownMethod, InvalidArgument, etc.)

- - Markus

Marcus Boerger wrote:
> Hello Sam,
> 
>   we actually thought of doing it, yes. And apparently I wanted to do
> something but I didn't find any time in the past year to be honest.
> 
> marcus
> 
> Thursday, December 27, 2007, 7:17:16 PM, you wrote:
> 
> > […]
> 
> 
> 
> 
> Best regards,
>  Marcus
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHeW4x1nS0RcInK9ARAqo+AJkBABGAww7cPP2mwdAMYBf2rIyrXgCfRhR2
pr1v9Nm3QcAGRBHdXUFT1wc=
=xjjT
-----END PGP SIGNATURE

---

## #34313 — sam@sambarrow.com — 2008-01-01T00:25:53+00:00

URL: https://externals.io/message/34264#34313 · In reply to: #34309

Are you interested in working together on some patches? I am trying to
write a patch for function return value type hinting as well as class
property type hinting. Maybe even regular variable type hinting if
possible.

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
>
> I'm monitoring this subject closely because for me and my inner Zen,
> having type hint next to namespaces is one of *the* things I'm looking
> forward.
>
> Now the current subject was only about return values, for me I'm looking
> for the big picture, having scalar type hints every where possible.
>
> I was using Sam's patch for some tests and was very satisfied with.
>
> Besides type hinting for all types, my only left wish is a more
> integrated usage of Exception (UnknownMethod, InvalidArgument, etc.)
>
> - - Markus
>
> Marcus Boerger wrote:
> > […]
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFHeW4x1nS0RcInK9ARAqo+AJkBABGAww7cPP2mwdAMYBf2rIyrXgCfRhR2
> pr1v9Nm3QcAGRBHdXUFT1wc=
> =xjjT
> -----END PGP SIGNATURE
