note 44300 added to language.types.type-juggling
| From: | php-general at lists dot php dot net | Date: | Tue, 20 Jul 2004 20:16:17 +0000 |
| Subject: | note 44300 added to language.types.type-juggling | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-73733@lists.php.net to get a copy of this message | ||
<?php
$a = "1"; // $a is a string
$a[0] = "a"; // $a becomes the string "a"
echo(gettype($a));
$a = ""; //$a is a string again
echo(gettype($a));
$a[0] = "a";
echo(gettype($a)); // now $a becomes an array!!!
?>
funny??? (this is on php 4.2)
----
Manual Page -- http://www.php.net/manual/en/language.types.type-juggling.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44300
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44300&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44300&report=yes
Search -- http://master.php.net/manage/user-notes.php