Re: Object Casting - An Alternative to Type Hinting

From: Date: Sun, 26 Feb 2012 21:45:43 +0000
Subject: Re: Object Casting - An Alternative to Type Hinting
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-58095@lists.php.net to get a copy of this message
I just realised that if it were going to add magic casting, it could as well be done with a spl_autocast_register(), so that you could either cast things when they match, throw an exception, etc. (there should be some default value dynamic typing, so the perfomance wouldn't hurt) . I don't think that's the perfect solution, though.

« previous php.internals (#58095) next »