Re: Scalar type hinting
From: Gustavo Lopes Date: Mon, 27 Feb 2012 20:04:49 +0000 Subject: Re: Scalar type hinting References: 1 2 3 4 5 6 7 Groups: php.internals Request: Send a blank email to [email protected] to get a copy of this message
On Mon, 27 Feb 2012 20:09:08 +0100, Johannes Schlüter <[email protected]> wrote:On Mon, 2012-02-27 at 13:05 -0600, Richard Lynch wrote:This is not true. The new operator can return NULL. The intl extension uses this extensively: -- Gustavo LopesI'd have to come up with some OTHER scenario not involving fatal error, such as: strict $db = new DB();The example is wrong. The new operator will always return an instance of the given class (or there will be an exception). Use
Thread (163 messages)
- RE: [PHP-DEV] Scalar type hinting
- Re: Scalar type hinting
- RE: [PHP-DEV] Scalar type hinting
- Re: Scalar type hinting
- RE: [PHP-DEV] Scalar type hinting
- Re: Scalar type hinting
- PHP Philosophy (was RE: [PHP-DEV] Scalar type hinting)
- RE: [PHP-DEV] PHP Philosophy (was RE: [PHP-DEV] Scalar type hinting)
- RE: [PHP-DEV] Scalar type hinting
- RE: [PHP-DEV] Scalar type hinting
- RE: [PHP-DEV] Scalar type hinting
« previous | php.internals (#58186) | next » |
---|