18 messages in net.php.lists.internalsRe: [PHP-DEV] [PATCH] Scalar type hin...
FromSent OnAttachments
Hannes MagnussonNov 3, 2006 10:00 am.txt
PierreNov 3, 2006 10:39 am 
Marcus BoergerNov 3, 2006 10:46 am 
Ron KorvingNov 3, 2006 10:48 am 
Ilia AlshanetskyNov 3, 2006 11:06 am 
PierreNov 3, 2006 11:12 am 
Zeev SuraskiNov 3, 2006 12:34 pm 
Brian MoonNov 3, 2006 2:45 pm 
Richard LynchNov 6, 2006 12:18 pm 
Markus FischerNov 6, 2006 11:00 pm 
Richard QuadlingNov 7, 2006 1:26 am 
Ron KorvingNov 7, 2006 2:19 am 
Richard QuadlingNov 7, 2006 2:39 am 
Christian SchneiderNov 7, 2006 6:45 am 
Richard QuadlingNov 7, 2006 7:33 am 
Richard LynchNov 7, 2006 10:45 am 
Richard QuadlingNov 8, 2006 1:37 am 
Derick RethansNov 15, 2006 12:19 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [PHP-DEV] [PATCH] Scalar type hinting ;)Actions...
From:Christian Schneider (csch@cschneid.com)
Date:Nov 7, 2006 6:45:52 am
List:net.php.lists.internals

ini_set('humour', "On");

Richard Quadling wrote:

Type hinting is part of the documentation. Sure, hungarian notation of variable names (where the type is represented within the variable name itself) is a good start, but when you get to things like a 4d array of

I wouldn't have expected anyone to use hungarian notation with PHP. But then again that's what the Spanish inquisition would probably use to torture nowadays and who expects the Spanish inquisition? (-:C

On the other hand it is easy to do it in PHP: Just prefix every variable with "m" :-)

The loose typing of PHP is great, but as mentioned by Richard Lynch, we have to more or less move away from it for user input and DB input.

Error: Incompatible use of constant 'we'

Maybe for V6 type hinting for scalars could be available, but output purely E_NOTICE. Really make them just a hint. A suggestion. This will

ini_set('humour', "Off");

All type hints warnings should be E_STRICT, not E_NOTICE IMHO. If that's the case then you can add as many bondage feature as you wish as long as they don't slow down non-strict code ;-)

- Chris