ID: 15533
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Bogus
Bug Type: Variables related
Operating System: Linux
PHP Version: 4.0.6
New Comment:
$string[...] and $string{...} both allow single
character access to strings. the {} variant is
recommended for PHP 4, but the older version
using [] still works
the indices inside [...] or {...} are interpreted
as integers, strings are casted to integers,
and (int)'blah' is zero, that's it
Previous Comments:
------------------------------------------------------------------------
[2002-02-13 03:08:52] [EMAIL PROTECTED]
<?
$arg = '123';
// prints 123
echo "arg = $arg<br>\n";
// prints nothing
echo "is_array(arg) = ", is_array($arg), "<br>\n";
// prints 1
echo "arg[blah] = $arg[blah]<br>\n";
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15533&edit=1