01-20-2008, 07:52 PM
|
#5 (permalink)
|
|
The Frequenter
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
|
Explicit type casting shouldn't be used to initalize variables, but to ensure you get the right data type when using it (that's what I believe, however).
PHP Code:
$a = 3; // implicit cast to integer
$a = 'abcd'; // implicit cast to string
(float) $a = 'asdf'; // why? not useful at all
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
|
|
|
|