Re: SimpleXML and the Single String (SOLVED)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> 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



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux