Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:67869 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25571 invoked from network); 26 Jun 2013 13:39:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Jun 2013 13:39:24 -0000 Authentication-Results: pb1.pair.com header.from=ocramius@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ocramius@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.179 as permitted sender) X-PHP-List-Original-Sender: ocramius@gmail.com X-Host-Fingerprint: 74.125.82.179 mail-we0-f179.google.com Received: from [74.125.82.179] ([74.125.82.179:53173] helo=mail-we0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E0/38-18025-B0FEAC15 for ; Wed, 26 Jun 2013 09:39:23 -0400 Received: by mail-we0-f179.google.com with SMTP id w59so10036841wes.24 for ; Wed, 26 Jun 2013 06:39:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=CKbWeP/sgsALlZRNaF8e+Xtkvgu2D0zx4Cq1oslCgBw=; b=CoQ4har9wIS1ONeWZr6xxMbC/jXFu8jaC318Of6Jc4pX+Lwx1ZjG0MKx2OHYhKdlXE zlWOMzyBPoXCgINWh4adlVuQn7a6RpgNVO9GmeHbyKS47FI49qGRS/wxdzUjVyOM6qCu sgPQJBc/zuDqx3bIgpUo9alfzv3rXUTPQLzCZknEBXZ3DR/qCZBKulXQkqTaupKZuw9j YLa7KhAQQhm0noxA6Aolqrb/0GaWwjdbOQfiuDwIdDwzn91DA/1wPkXwyYZVYFDdrcVV 4tbcfYjTRsyYdTPODQxH1pUFyiKr42UlP4pIsa0JkntZyC80j11lpBVEjMX+Fj2t5FIM q+8A== X-Received: by 10.195.12.18 with SMTP id em18mr2766135wjd.78.1372253960743; Wed, 26 Jun 2013 06:39:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.151.162 with HTTP; Wed, 26 Jun 2013 06:38:59 -0700 (PDT) In-Reply-To: References: Date: Wed, 26 Jun 2013 15:38:59 +0200 Message-ID: To: Julien Pauli Cc: Patrick ALLAERT , Maxwell , Sherif Ramadan , Florin Patan , "internals@lists.php.net" Content-Type: multipart/alternative; boundary=047d7bfcfde6df331004e00ec5af Subject: Re: [PHP-DEV] Request for comments - new PHP feature: return typing From: ocramius@gmail.com (Marco Pivetta) --047d7bfcfde6df331004e00ec5af Content-Type: text/plain; charset=UTF-8 On 26 June 2013 15:35, Julien Pauli wrote: > On Wed, Jun 26, 2013 at 2:58 PM, Patrick ALLAERT >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/ --047d7bfcfde6df331004e00ec5af--