Re: Re: [RFC-Discuss] Scalar Type Declarations v0.5
| From: | Leigh | Date: | Tue, 24 Feb 2015 15:14:11 +0000 |
| Subject: | Re: Re: [RFC-Discuss] Scalar Type Declarations v0.5 | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83670@lists.php.net to get a copy of this message | ||
I've been having a play around with the implementation, and it's been
behaving pretty solidly, nothing unexpected so far.
I've even gotten around my issue regarding no strict-by-default option
for those of us who want it.
Maybe this will sway a few voters. I'll put the source up if this
particular implementation gets through (no point otherwise!)
~/php-strict $ ../php-src/sapi/cli/php -r 'function foo(int $bar) {
var_dump($bar); } foo("10");'
int(10)
~/php-strict $ ../php-src/sapi/cli/php -d extension=modules/strict.so
-r 'function foo(int $bar) { var_dump($bar); } foo("10");'
Catchable fatal error: Argument 1 passed to foo() must be of the type
integer, string given, called in Command line code on line 1 and
defined in Command line code on line 1