On Thu, 2006-02-09 at 17:10, Ian P. Christian wrote:
> On Thursday 09 February 2006 22:08, Sean Coates wrote:
> > It's cast to an integer.
> 
> Ahh.. I see. That does make sense now as to why it results in the first char 
> in the array - however I still think it makes more sense not to cast, but 
> rather to give a fatal error.

PHP is primarily a web language. Many indexes are pulled from $_GET and
$_POST and for obvious reasons are strings. One of the convenience
factors of PHP is that noobs don't need to think about casting their
strings to ints to index.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to