Re: Request for comments - new PHP feature: return typing

From: Date: Wed, 26 Jun 2013 13:38:59 +0000
Subject: Re: Request for comments - new PHP feature: return typing
References: 1 2 3 4 5  Groups: php.internals 
Request: Send a blank email to internals+get-67869@lists.php.net to get a copy of this message
On 26 June 2013 15:35, Julien Pauli <jpauli@php.net> wrote: > On Wed, Jun 26, 2013 at 2:58 PM, Patrick ALLAERT <patrickallaert@php.net > >wrote: But what Sherif said proves as well the limits of the idea. PHP is not > strongly typed. So each check, should it be type hinting or return type > hinting, has to be done at runtime , which is bad for performances. > > Not talking about the type juggling which could lead the programmer as > shooting himself. > > Julien.Pauli > What about disabling the check in some environments (prod)? It would work like an assertion I suppose. (Feel free to shoot at me if you think it's a bad idea) Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/

« previous php.internals (#67869) next »