Re: [POC Patch] Scalar Type Hinting/Casting - Proof Of Concept

From: Date: Fri, 02 Mar 2012 07:16:20 +0000
Subject: Re: [POC Patch] Scalar Type Hinting/Casting - Proof Of Concept
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-58457@lists.php.net to get a copy of this message
Anthony Ferrara wrote:
foo(1); // int(1) foo("1"); // int(1) foo(1.5); // int(1) foo("foo"); // E_RECOVERABLE_ERROR - Expected integer foo(array()); // E_RECOVERABLE_ERROR
Double-checking, but this is different to normal typecasting, isn't it? If so, it might be a bit confusing using the typecasting syntax. -- Ryan McCue <http://ryanmccue.info/>

« previous php.internals (#58457) next »