Re: Strange action with =&

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter Beckman wrote:

Because I'm trying to point out a problem with PHP, where setting a
 reference when the other side is undefined or not set, PHP creates a
 reference to a previously non-existent array item, just by setting a
 reference.  I don't think that should happen.

And? what's wrong with that. The reference can be used in the future - I think thats why it doesnt produce any error message.
ie.
$array=array("1"=>"a","3"=>"c");
$ref=&$array["2"];
$array["2"]="b";
echo($ref);


OKi98

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux