View Single Post
Old 01-20-2008, 07:52 PM   #5 (permalink)
xenon
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default

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.
xenon is offline  
Reply With Quote
The Following User Says Thank You to xenon For This Useful Post:
Orc (01-20-2008)