note 114197 added to language.types.array
| From: | ffe | Date: | Thu, 23 Jan 2014 14:39:26 +0000 |
| Subject: | note 114197 added to language.types.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-198320@lists.php.net to get a copy of this message | ||
<?php
error_reporting(E_ALL);
$res=42;
echo("+".$res[0]."+".$res[10]."+");
$res[0]=1;
?>
The last line correctly states "Warning: Cannot use a scalar value as an array", but the
echo produces +++ as output with no warning. This seems strange to me.
----
Server IP: 72.52.91.14
Probable Submitter: 72.52.91.14
----
Manual Page -- http://php.net/manual/en/language.types.array.php
Edit -- https://master.php.net/note/edit/114197
Del: integrated -- https://master.php.net/note/delete/114197/integrated
Del: useless -- https://master.php.net/note/delete/114197/useless
Del: bad code -- https://master.php.net/note/delete/114197/bad+code
Del: spam -- https://master.php.net/note/delete/114197/spam
Del: non-english -- https://master.php.net/note/delete/114197/non-english
Del: in docs -- https://master.php.net/note/delete/114197/in+docs
Del: other reasons-- https://master.php.net/note/delete/114197
Reject -- https://master.php.net/note/reject/114197
Search -- https://master.php.net/manage/user-notes.php