|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-11-05 17:17 UTC] vrana@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 02:00:01 2026 UTC |
Description: ------------ While messing around with the feature mentioned in the summary, I came across some undocumented results and/or bugs which should be documented (or fixed respectively). Offsets - When using an out of range offset, the string is padded with spaces. - When using a floating point number as offset, it is *always* rounded down. - When using an illegal type (such as an array) as offset, a warning is emitted and 0 is assumed. - When using a negative offset, PHP reports an uninitialized offset in read context, but reports an illegal offset in write context. Insert strings - When using a string which length is greater than 1, only the first character is used. (Fairly obvious but not documented) - When using a string which length is 0 ("", that is), a \0 character is inserted at that position instead. The last result is the strangest one. Might be a bug.