|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-09-27 14:53 UTC] derick@php.net
[2006-09-27 14:54 UTC] tony2001@php.net
[2006-09-27 15:14 UTC] hendlerman at yahoo dot com
[2006-09-27 15:32 UTC] hendlerman at yahoo dot com
[2006-09-27 15:34 UTC] hendlerman at yahoo dot com
[2006-09-27 15:34 UTC] tony2001@php.net
[2006-09-27 15:37 UTC] hendlerman at yahoo dot com
[2006-09-27 15:45 UTC] tony2001@php.net
[2006-09-27 15:48 UTC] hendlerman at yahoo dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 21:00:01 2025 UTC |
Description: ------------ The error is caused by a user error, but I believe PHP should be throwing an error. PHP is not strongly typed, but I thought you get a warning if you try to convert a string to an array. Sorry I am not in 5.1.6 Reproduce code: --------------- /** * Output for me * PHP version 5.1.4 * Array ( [name] => 2alue ) * * */ function array_bug() { echo "PHP version ". phpversion().'<br />'; $test_array = array(); $test_array['name'] = 'value'; $test_array['name']['count'] = 2; print_r($test_array); } array_bug(); exit; Expected result: ---------------- I would expect an error or warning Actual result: -------------- Array ( [name] => 2alue )