Re: Type hinting misunderstood
| From: | Markus Fischer | Date: | Sun, 06 Jan 2008 20:16:53 +0000 |
| Subject: | Re: Type hinting misunderstood | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-34539@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mikko Koppanen wrote:
| I have not been following very closely this conversation so this might
have
| been answered already:
|
|
| $b = '5';
|
| function foo( int &$a )
| {
| echo gettype( $a );
| }
|
| foo( $b );
|
| echo gettype( $b );
|
|
| what is type of $b after the function call?
Great example that hinting is not converting!
In Sams latest patch and the version I'm voting for, there's no "after"
because this (should) throw E_RECOVERABLE_ERROR. If you ignore the
error, it's not changed.
- - Markus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHgTc11nS0RcInK9ARAqRuAKCk8khrBAl7cjkkopkcNUmFOYVD8ACeO8EW
lDN/nxNSxYYv732PBYKJo+Y=
=QfXc
-----END PGP SIGNATURE-----