>> I don't really see a need to add an extra layer or class extension
>> when casting works fine. Am I wrong? Why add several lines of code in
>> an extension class?
>>
> To keep the code readable?
>
> $value = $xml->node;
>
> vs.
>
> $value = (String)$xml->node;
>
> I like the first one. Plus you handle it to dynamically to the right type
>
> function __get($value)
> {
> if is float return float casted value
> if is boolean ...
> and so on
> }
The code is no less readable my way, YMMV
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php