|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-07-18 19:50 UTC] cmb@php.net
[2016-02-15 13:09 UTC] francois@php.net
-Status: Open
+Status: Duplicate
-Operating System: windows 8
+Operating System: any
[2016-02-15 13:09 UTC] francois@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 19:00:01 2025 UTC |
Description: ------------ I am using the charter position for doing something with string and for some reason when a string is empty it will automatic cast to array which i am not sure is it supposed to happen. Test script: --------------- $str = ""; $str[0] = "b"; var_dump($str); $str = "a"; $str[0] = "b"; var_dump($str); Expected result: ---------------- string(1) "b" string(1) "b" Actual result: -------------- array(1) { [0]=> string(1) "b" } string(1) "b"