note 44300 deleted from language.types.type-juggling by tomsommer
| From: | tomsommer@php.net | Date: | Tue, 20 Jul 2004 20:40:04 +0000 |
| Subject: | note 44300 deleted from language.types.type-juggling by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-73738@lists.php.net to get a copy of this message | ||
Note Submitter:
----
<?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)