A small question
| From: | Joey | Date: | Wed, 01 Sep 1999 11:42:54 +0000 |
| Subject: | A small question | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-3958@lists.php.net to get a copy of this message | ||
I was trying something out, and ran into something
that seemed odd...
I wanted to know what would happen if I:
<?
$a = array(1,2,3,4,5,6,7,8);
$foo = &$a[3];
$next = $foo++;
echo $next . "\n";
?>
Hoping that maybe $a[4] would get into $next...
Here's what I got:
4
-: Freeing 0x001A50E8 (39 bytes), allocated in zend_hash.c on line
175<br>
-: Freeing 0x001A4E48 (4 bytes), allocated in zend_hash.c on line 391<br>
-: Freeing 0x001A4DF0 (35 bytes), allocated in zend_hash.c on line
380<br>
I'm just not sure if that is the expected result or not...ie, I gather
that it doesn't do what I was looking at, but why did I get these errors?
Still don't know a _WHOLE_ lot about "C", but is that a memory leak, or
just something I caused by trying to increment $foo?
--Joey Smith