Re: No notices for undefined index

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

 



On Fri, 2010-04-09 at 14:15 +0100, Nathan Rixham wrote:

> Ashley Sheridan wrote:
> > can't find anything in the manual that explains what should happen when
> > you treat a string like an array in PHP. 
> 
> http://www.php.net/manual/en/language.types.string.php#language.types.string.substr
> 
> :)
> 


Thanks, and I think that page answers the whole question:

"Writing to an out of range offset pads the string with spaces.
Non-integer types are converted to integer. Illegal offset type emits
E_NOTICE. Negative offset emits E_NOTICE in write but reads empty
string. Only the first character of an assigned string is used.
Assigning empty string assigns NUL byte."

Thanks,
Ash
http://www.ashleysheridan.co.uk



[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