Re: [RFC] Strict type hints (parameter and return value)

From: Date: Thu, 17 Apr 2008 19:04:16 +0000
Subject: Re: [RFC] Strict type hints (parameter and return value)
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-37117@lists.php.net to get a copy of this message
Hi!
When you can use string but not object with __toString?
my patch does that
Ok, that's great. So then it makes sense to allow converting int->string too, right? And then it'd also make sense to allow string->int too? Especially if we have object->int convertor and that can be allowed too. In fact, we have good old conversion system used in parse_parameters. So why not use the same rules? That'd make at least some sense - give PHP programmers the tools that extension C programmers have. I still wouldn't like it too much but at least it would make sense :) -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#37117) next »