Re: Type hinting

From: Date: Mon, 24 May 2010 05:58:44 +0000
Subject: Re: Type hinting
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-48419@lists.php.net to get a copy of this message
Hi!
any mistmatch results in an error
An error that is recoverable. So not only is the "strict typing" optional, but "type mismatches" can be caught and handled.
Unfortunately, PHP doesn't have good means to handle such kind of errors. Global "shut up" handler is not a good means, as it disables the whole protection, effectively forcing third-party code to work with variable it wasn't written to handle, and you have no means of separating OK and not OK cases. And on top of that, even silent errors are still very expensive in PHP. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227

« previous php.internals (#48419) next »