From: Nathan Rixham on 9 Apr 2010 09:15 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 :)
From: Ashley Sheridan on 9 Apr 2010 15:36 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
First
|
Prev
|
Pages: 1 2 3 Prev: Beginner's question: How to run a PHP web application locally? Next: Forgot what to install |