Re: [PATCH] Scalar type hinting ;)

From: Date: Tue, 07 Nov 2006 14:46:15 +0000
Subject: Re: [PATCH] Scalar type hinting ;)
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-26405@lists.php.net to get a copy of this message
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

« previous php.internals (#26405) next »