> De : Rowan Collins [mailto:rowan.coll...@gmail.com] > > They'd use whatever (non-reserved) namespace the implementer wanted. > e.g. > > namespace Symfony\Component\TypeChecking; > > basicType nonNegativeInt extends PHP\types\int { > public function isValid(int $value) { > return $value >= 0; > } > } > > basicType PositiveInt extends nonNegativeInt { > public function isValid(nonNegativeInt $value) { > return $value != 0; > } > }
Interesting. But, if I understand well, these are not classes, as they keep dealing with scalars. Or we should create an OO API to scalars, which is a very complex project. Regards François -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php